For AI Agents
Hand your agent this brief or the ReUI MCP, not a screenshot. Installs with a ReUI Pro or Ultimate license.
Best for: An org tree where checking a manager selects their whole line, with a bulk action bar and direct reports, line size and open roles rolled up
When to use
- Records bucketed under collapsible group rows by stage, region or risk band, with a count or subtotal on each
- Parent and child hierarchies of any depth, such as a bill of materials or an org chart, rolled up per level
- Stage pipelines laid out as stacked sections, each its own table that repeats the column header row
When not to use
- Parts and assemblies with cost and lead time rolled up each level: use the Bill of Materials block
- A long flat list scrolled endlessly with bulk row actions: use the Card Payments Ledger block
- Group rows built from the bare parts in your own page, with no toolbar or demo records: use the Data Grid component
- A flat record list paged at the foot, with no heading rows between records: use the Base blocks
- Each record opening in place onto its own sub-tasks or a rail of check cards: use the Expansion blocks
Agent notes
- Replace
ORG_TREE, a recursivePersonNodetree;buildOrgRowsderives direct reports, org size and open roles handleOrgAction,handleExportandhandleBulkActiononly raise a toast;handleBulkActionthen clearsrowSelectionTreeRowSelectwrites a manager's whole line intorowSelectionby hand instead of using the grid's built-in selection- Each page.tsx wraps the view in a
min-h-svhmain under an sr-onlyh1, and the view adds a paddedmax-w-7xlsection; drop both inside an app shell - Search and filters run in the browser over every demo row, and
manualPaginationleaves the rows unsliced with no pager; move both to your API at scale - Create, open and export buttons change no data and only raise a sonner
toast; point them at your own routes and API
Third-party API docs
- TanStack Table v9: API reference, docs
- Sonner v2: API reference, docs
https://web.dev.reui.io/blocks/data-grid/grouping/data-grid-grouping-5.mdget_block("data-grid-grouping-5")npx shadcn@latest add @reui/data-grid-grouping-5Shadcn Components in the Reporting Hierarchy Block
Dependencies
- @tanstack/react-table
- cn
- sonner
Shadcn Reporting Hierarchy Block
Reporting Hierarchy Tree Grid With Span Of Control And Cascading Selection. Part of the ReUI Shadcn Data Grid Grouping blocks collection.
Multi-level DataGrid tree mode for an HR org chart: recursive subRows at arbitrary depth, DataGridTableRowExpand indentation, org size and open roles rolled up each reporting line, tree-cascading row selection with a corrected tri-state checkbox, sticky header, depth control and a bulk selection bar.
It is composed from Avatar, Badge, Button, Checkbox, Data Grid, Dropdown Menu, Field, Frame, and more, so every part of it is a primitive you can restyle with your own design tokens.
What You Can Build With the Reporting Hierarchy Block
- Install it with the ReUI registry command in the toolbar above, then swap the placeholder content, data wiring, and business logic for your own.
- Compare it across all eight ReUI styles and both the Base UI and Radix bases in the customizer before committing to one direction.
- Combine it with the other Shadcn Data Grid Grouping blocks to assemble a full screen instead of a single section.
All Shadcn Data Grid Grouping Blocks
The rest of this category, each on its own page with a live preview, the components it is built from, and the install command.
- Roadmap by Stage Roadmap Queue Data Grid Grouped by Stage with Collapsible Category Rows
- Revenue by Region Account revenue grouped by region with collapsible rows and ARR subtotals
- Patient Access Cohorts Patient access cohort DataGrid with switchable grouping and outcome heatmap
- Bill of Materials Bill Of Materials Tree Grid With Rolled-Up Cost And Supply Risk
- Editorial Pipeline Editorial Production Desk With Per Section Tables And Repeated Headers
- Studio Delivery Board Delivery Board With Per Stage Column Headers And Segmented Completion Meters
Related Shadcn Data Grid Block Categories
- Base (8) Complete table screens with toolbar filters and pagination for CRM, support, team, project, and pricing data.
- Advanced (8) Analytics grids with in-cell charts, KPI rollups, a tree view and an SLO chart, plus a review queue, a stock mix sheet, a pro forma and a visit planner.
- Columns (5) Column visibility, pinning, resizing, density, and settings controls.
- Drag & Drop (4) Drag-and-drop row and column reordering with sortable handles.
- Editing (6) Inline create, edit, and delete cells for full CRUD workflows.
- Expansion (3) Expandable parent rows with nested sub-rows and master-detail panels.
All Shadcn Block Groups
Browse the full ReUI Shadcn blocks library by product surface. Each group bundles category-level blocks you can mix and match across your project.
- Shadcn Application Blocks (303) Browse 303 Shadcn Application blocks across 23 categories.
- Shadcn Data Grid Blocks (47) Browse 47 Shadcn Data Grid blocks across 9 categories.
- Shadcn Charts Blocks (52) Browse 52 Shadcn Charts blocks across 10 categories.
- Shadcn Solutions Blocks (76) Browse 76 Shadcn Solutions blocks across 11 categories.
- Shadcn AI & Agents Blocks (22) Browse 22 Shadcn AI & Agents blocks across 3 categories.
- Shadcn eCommerce Blocks (87) Browse 87 Shadcn eCommerce blocks across 13 categories.
- Shadcn Marketing Blocks (67) Browse 67 Shadcn Marketing blocks across 8 categories.
Frequently Asked Questions
When should I use the Reporting Hierarchy block?
Use it for an org tree where checking a manager selects their whole line, with a bulk action bar and direct reports, line size and open roles rolled up.
The Grouping category fits:
- Records bucketed under collapsible group rows by stage, region or risk band, with a count or subtotal on each
- Parent and child hierarchies of any depth, such as a bill of materials or an org chart, rolled up per level
- Stage pipelines laid out as stacked sections, each its own table that repeats the column header row
For parts and assemblies with cost and lead time rolled up each level, use the Bill of Materials block. For a long flat list scrolled endlessly with bulk row actions, use the Card Payments Ledger block. For group rows built from the bare parts in your own page, with no toolbar or demo records, use the Data Grid component. For a flat record list paged at the foot, with no heading rows between records, use the Base blocks. For each record opening in place onto its own sub-tasks or a rail of check cards, use the Expansion blocks.
What is the Reporting Hierarchy block built with?
Can I restyle the Reporting Hierarchy block?
How should I use Shadcn grouping blocks in a real project?
Start building with ReUI Pro today.
Every Pro block, every style, and every future addition, with one license for unlimited projects.
From $249, once. Lifetime updates.