Launch sale — 60% off Pro
Contact
Tables

Not affiliated with official shadcn/ui. Visit ui.shadcn.com for official docs.

Unlock this blockGet Pro at 60% off

React Table Block Subtotals

Table component with subtotals and group summaries for React financial and reporting dashboards

Looking to implement shadcn/ui blocks?

Join our Discord community for help from other developers.


Calculate totals on your Next.js reporting dashboard with this subtotal table component. Features automatic sum calculations, group subtotal rows, grand total footer, formatted currency values, percentage of total column, and visual separator rows. Built with shadcn/ui Table component using Tailwind CSS. The inline calculations provide instant insights perfect for expense reports, sales summaries, budget tracking, invoice line items, or any React app requiring grouped numeric aggregations.

Q1 Expense Report

10 line items across 4 categories

$29,000

Total expenses

IDDescriptionCategoryQtyUnit PriceTotal% of Total
EXP-001Cloud hosting (Annual)Software1$2,400$2,4008.3%
EXP-002Design tool licenses5$180$9003.1%
EXP-003Project management SaaS1$600$6002.1%
Software Subtotal7$3,90013.4%
EXP-004Laptops for new hiresHardware3$1,500$4,50015.5%
EXP-005Monitor upgrades5$400$2,0006.9%
Hardware Subtotal8$6,50022.4%
EXP-006Consulting feesServices40$150$6,00020.7%
EXP-007Security audit1$3,500$3,50012.1%
EXP-008Training workshops2$800$1,6005.5%
Services Subtotal43$11,10038.3%
EXP-009Ad campaign Q1Marketing1$5,000$5,00017.2%
EXP-010Trade show booth1$2,500$2,5008.6%
Marketing Subtotal2$7,50025.9%
Grand Total60$29,000100%

Subtotals shown at end of each category. Percentages calculated against grand total.

Installation

Questions you might have