UI

Table

Display data efficiently in a column and row format.

NameMonsters SlayedRegionStatus
Wilhelm Tell1Uri, Schwyz, UnterwaldenNational Hero
The Witcher129KaedwenLegend
Mizutsune82JapanN/A

Import Table components

Tremor exports 8 components to create a table:

  • Table: Wrapper component to declare a table
  • TableHead: Declare a header row for the table. Acts as a wrapper component for the header cells
  • TableHeaderCell: Declare a header cell
  • TableBody: Wrapper component for the body of the table (rows)
  • TableRow: Child component representing a row
  • TableCell: Child component representing a cell within a row
  • TableFoot: Declare a footer row for the table. Acts as a wrapper component for the footer cells
  • TableFooterCell: Declare a footer cell
import {  Table,  TableHead,  TableHeaderCell,  TableBody,  TableRow,  TableCell,  TableFoot,  TablerFooterCell,} from '@tremor/react';

Usage example

The example below shows a composition of a table using Card, Table, TableHead, TableHeaderCell, TableBody, TableRow, TableCell and Badge components.

List of Swiss Federal Councillours

NamePositionDepartmentStatus
Viola AmherdFederal CouncillorThe Federal Department of Defence, Civil Protection and Sport (DDPS)active
Albert RöstiFederal CouncillorThe Federal Department of the Environment, Transport, Energy and Communications (DETEC)active
Beat JansFederal CouncillorThe Federal Department of Justice and Police (FDJP)active
Ignazio CassisFederal CouncillorThe Federal Department of Foreign Affairs (FDFA)active
Karin Keller-SutterFederal CouncillorThe Federal Department of Finance (FDF)active
Guy ParmelinFederal CouncillorThe Federal Department of Economic Affairs, Education and Research (EAER)active
Elisabeth Baume-SchneiderFederal CouncillorThe Federal Department of Home Affairs (FDHA)active

API Reference: Table

This component does not have any public properties.

API Reference: TableHead

This component does not have any public properties.

API Reference: TableHeaderCell

This component does not have any public properties.

API Reference: TableBody

This component does not have any public properties.

API Reference: TableRow

This component does not have any public properties.

API Reference: TableCell

This component does not have any public properties.

Theming

Table

Font size
fontSizetremor-default
Text color
colorstremor-content-DEFAULT

TableHead, Table Foot

Text color
colorstremor-content-DEFAULT
Border color (Footer Only)
colorstremor-border-DEFAULT

TableHeaderCell, TableFooterCell

Text color
colorstremor-content-DEFAULT

TableBody

Divider color
colorstremor-border-DEFAULT