BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn-table-library/tree-table-selection

Tree Table — Selection

shadcn-table-library/tree-table-selection
FreeBlock

Tree table with cascading checkbox selection and indeterminate state for partially-selected branches.

Install it

npx shadcn@latest add https://shad-table.dev/r/tree-table-selection.json

Source

src/components/tree-select/columns.tsxshad-table.dev/r/tree-table-selection.json
1'use client'
2
3import type { ColumnDef } from '@tanstack/react-table'
4import { ChevronRight } from 'lucide-react'
5
6import { Checkbox } from '#/components/ui/checkbox.tsx'
7
8export type OrgNode = {
9 id: string
10 name: string
11 role: string
12 status: string
13 children?: OrgNode[]
14}
15
16export const columns: ColumnDef<OrgNode>[] = [
17 {
18 id: 'select',
19 header: ({ table }) => (
20 <Checkbox
21 checked={
22 table.getIsAllRowsSelected()
23 ? true
24 : table.getIsSomeRowsSelected()
25 ? 'indeterminate'
26 : false
27 }
28 onCheckedChange={(value) => table.toggleAllRowsSelected(!!value)}
29 aria-label="Select all rows"
30 />
31 ),
32 cell: ({ row }) => (
33 <Checkbox
34 checked={
35 row.getIsSelected()
36 ? true
37 : row.getIsSomeSelected()
38 ? 'indeterminate'
39 : false
40 }
41 onCheckedChange={(value) => row.toggleSelected(!!value)}
42 aria-label="Select row"
43 />
44 ),
45 enableSorting: false,
46 },
47 {
48 accessorKey: 'name',
49 header: 'Name',
50 cell: ({ row }) => (
51 <div
52 className="flex items-center gap-1.5"
53 style={{ paddingLeft: `${row.depth * 1.25}rem` }}
54 >
55 {row.getCanExpand() ? (
56 <button
57 type="button"
58 onClick={row.getToggleExpandedHandler()}
59 className="flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground"
60 aria-label={row.getIsExpanded() ? 'Collapse row' : 'Expand row'}
61 >
62 <ChevronRight
63 className={`h-3.5 w-3.5 transition-transform ${
64 row.getIsExpanded() ? 'rotate-90' : ''
65 }`}
66 />
67 </button>
68 ) : (
69 <span className="w-4 shrink-0" />
70 )}
71 {row.original.name}
72 </div>
73 ),
74 },
75 {
76 accessorKey: 'role',
77 header: 'Role',
78 sortingFn: 'alphanumeric',
79 },
80 {
81 accessorKey: 'status',
82 header: 'Status',
83 sortingFn: 'basic',
84 },
85]

What it pulls in

npm packages

  • @tanstack/react-table

Other registry items

  • table
  • checkbox

Files it writes

  • src/components/tree-select/columns.tsx
  • src/components/tree-select/data-table.tsx
  • src/components/tree-select/index.tsx

Facts

Registry
shadcn-table-library
Type
registry:block
Access
Free
Files written
3
Licence
the repository states none
In the index
at or before 2026-08-12
Last confirmed
yesterday

Go to the source

shad-table.dev coros-hq/shadcn-table-library on GitHub Raw registry item This item as JSON

More from shadcn-table-library

All 18 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Animated Icons Tableanimated-icons-tableshadcn-table-libraryBlocksFree2 deps · 9 files
Comparison Tablecomparison-tableshadcn-table-libraryBlocksFree1 dep · 4 files
Data Tabledata-tableshadcn-table-libraryBlocksFree1 dep · 4 files
Density & Exportdensity-export-tableshadcn-table-libraryBlocksFree1 dep · 4 files
Editable Tableeditable-tableshadcn-table-libraryBlocksFree1 dep · 3 files
Grouped Tablegrouped-tableshadcn-table-libraryBlocksFree1 dep · 3 files
Heatmap Tableheatmap-tableshadcn-table-libraryBlocksFree1 dep · 4 files
Summary / KPI Tablekpi-tableshadcn-table-libraryBlocksFree1 dep · 5 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex