Componentdata0.95 KB gzipZero dependencies

Tree Table

Hierarchical table rows with expand/collapse chevrons.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add tree-table

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { TreeTable } from "@/components/ui/tree-table"; <TreeTable />

Source code

tree-table.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxtree-table.tsx77 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface TreeNode {  id: string;  label: string;  value?: string;  children?: TreeNode[];} export interface TreeTableProps extends React.HTMLAttributes<HTMLDivElement> {  nodes: TreeNode[];} /** Tree table with expandable rows and connecting lineage branches. */export function TreeTable({ nodes = [], className, ...props }: TreeTableProps) {

Props

PropTypeDescription
nodesTreeNode[]Configures nodes. (Default: [])