Componentdata0.79 KB gzipZero dependencies

Row Expand

Expandable row detail panels with height animation.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add row-expand

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { RowExpand } from "@/components/ui/row-expand"; <RowExpand />

Source code

row-expand.tsx + 1 helper

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

tsxrow-expand.tsx55 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface RowExpandItem {  id: string;  label: string;  detail: React.ReactNode;} export interface RowExpandListProps extends React.HTMLAttributes<HTMLDivElement> {  items: RowExpandItem[];} /** Expandable row list: accordion details with height animation. */export function RowExpandList({ items = [], className, ...props }: RowExpandListProps) {  const [openId, setOpenId] = React.useState<string | null>(null);

Props

PropTypeDescription
itemsRowExpandItem[]Structured list of items rendered by the component. (Default: [])