跳到主要内容

Tables

Example

Use the striped, bordered and hover props to customise the table.

结果
Loading...
实时编辑器

Small Table

Use size="sm" to make tables compact by cutting cell padding in half.

结果
Loading...
实时编辑器

Dark Table

Use variant="dark" to invert the colors of the table and get light text on a dark background.

结果
Loading...
实时编辑器

Striped rows

Use striped to add zebra-striping to any table row within the table.

结果
Loading...
实时编辑器

Striped columns

Use striped="columns" to add zebra-striping to any table column.

结果
Loading...
实时编辑器

Responsive

Responsive tables allow tables to be scrolled horizontally with ease.

Always Responsive

Across every breakpoint, use responsive for horizontally scrolling tables. Responsive tables are wrapped automatically in a div. The following example has 12 columns that are scrollable horizontally.

结果
Loading...
实时编辑器

Breakpoint specific

Use responsive="sm", responsive="md", responsive="lg", or responsive="xl" as needed to create responsive tables up to a particular breakpoint. From that breakpoint and up, the table will behave normally and not scroll horizontally.

结果
Loading...
实时编辑器

API

Table