www/docs/components/table.mdx
import TableBasic from '!!raw-loader!../examples/Table/Basic'; import TableDark from '!!raw-loader!../examples/Table/Dark'; import TableStripedRow from '!!raw-loader!../examples/Table/StripedRow'; import TableStripedColumns from '!!raw-loader!../examples/Table/StripedColumns'; import TableResponsive from '!!raw-loader!../examples/Table/Responsive'; import TableResponsiveBreakpoints from '!!raw-loader!../examples/Table/ResponsiveBreakpoints'; import TableSmall from '!!raw-loader!../examples/Table/Small';
Use the striped, bordered and hover props to customise the table.
Use size="sm" to make tables compact by cutting cell padding in half.
Use variant="dark" to invert the colors of the table and get light text
on a dark background.
Use striped to add zebra-striping to any table row within the table.
Use striped="columns" to add zebra-striping to any table column.
Responsive tables allow tables to be scrolled horizontally with ease.
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.
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.