Componentdata0.51 KB gzipZero dependencies
Table Summary
Table footer summary rows with bolded totals in dashed frame.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add table-summaryOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { TableSummary } from "@/components/ui/table-summary"; <TableSummary />Source code
table-summary.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxtable-summary.tsx42 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface SummaryRow { id: string; label: string; value: string; /** Emphasized bold total summary row */ bold?: boolean;} export interface TableSummaryProps extends React.HTMLAttributes<HTMLDivElement> { rows: SummaryRow[]; caption?: string;} Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { TableSummary } from "@/components/ui/table-summary"; <TableSummary />| Prop | Type | Description |
|---|---|---|
| rows | SummaryRow[] | Configures rows. (Default: []) |
| caption | string | Configures caption. |