Componentdata0.51 KB gzipZero dependencies

Table Summary

Table footer summary rows with bolded totals in dashed frame.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

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

npx bigbullui add table-summary

Or install the full npm package:

npm install bigbullui

Usage

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

Source code

table-summary.tsx + 1 helper

Zero 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 />
PropTypeDescription
rowsSummaryRow[]Configures rows. (Default: [])
captionstringConfigures caption.