Skip to content
HomeCobalt

Table

Shows a few rows a person reads whole, such as the charges on a booking, the parameters of an endpoint or a fund's largest holdings in a card.

Examples

The charges on a booking, with the total in the footer.
Charges for booking BK-4821, Oct 24 to Oct 27.
ItemAmount
Double room, garden side3 nights at $139.00$417.00
Breakfast2 guests, 3 mornings$54.00
City tax$1.00 per guest per night$6.00
Total$477.00
In a cardA short table in a card; its first column lines up with the card's title.
Rooms in October
Nights booked so far and the average rate.
RoomNightsRate
Garden double41$139.00
Single28$129.00
Suite9$272.00

States

Quarterly figures
FigureQ4 2025Q1 2026Q2 2026Q3 2026
Gross assets$4.1B$4.3B$4.6B$4.8B
Holdings171176179186
ScrollsIn a card narrower than its four quarters, the table scrolls sideways inside the card, which then takes a Tab stop.

Usage

Use it when

  • A handful of rows that a person reads whole, in a card, a dialog or a docs page.
  • A receipt, a fee breakdown or a list of parameters with columns that line up.

Use something else when

  • The rows come from a server, run past 50, or need sorting or filtering. Use DataTable instead.
  • The rows describe one thing as label and value pairs. Use DataList instead.
  • Each row is a thing to open, with a name and a line about it. Use Item instead.

Rules

General

Content

Avoid

Limits

Install

npx shadcn@latest add https://kaanarici.com/r/cobalt/table.json
import { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption } from "@/components/cobalt/ui/table"