#Table

import Table from "@poodle/ui/Table";

Table is a simple table component to display tabular data.

Please use Table component with other table components set to maximize the theming and efficiency.

#Simple

IDEmailName
200joe@example.comJoe Kir
201lary@example.comLary Hitu
202muni@example.comMunica Roll

#Border

We can set table outer border with prop withBorder={true}.

IDEmailName
200joe@example.comJoe Kir
201lary@example.comLary Hitu
202muni@example.comMunica Roll

#Row divider and hoverable

We can add row divider with prop withDivider={true}. Also, we can add background color when the user hover on the row with props withHover={true}.

IDEmailName
200joe@example.comJoe Kir
201lary@example.comLary Hitu
202muni@example.comMunica Roll

#Row selected

We can add mark a row is selected by add props isSelected={true} to <TableRow /> component.

The component with propisSelected={true} will add attribute data-selected="true" to tr element.

IDEmailName
200joe@example.comJoe Kir
201lary@example.comLary Hitu
202muni@example.comMunica Roll

#Sizes

Change table size via prop sizeStyle.

Default table sizes are s, m, l. If you do not set size, the button will use the size m as default.

IDEmailName
200joe@example.comJoe Kir
201lary@example.comLary Hitu
202muni@example.comMunica Roll

#Theming

Please check theming component document here.

export type TableStyleKeys = "root" | "table"
export interface TableThemeConfig
extends StandardThemeConfig<TableStyleKeys, TableProps> {}

#Props

#Local Props

NameTypeDescription
childrenReact.ReactNode
sizeStyle"s" \| "m" \| "l" \| stringChange table size. Built-in options are "s" | "m" | "l".

Default is "m".
tablePropsBoxPropsCustomize inner table props.
withBorderbooleanApply root border.
withDividerbooleanAdd divider for each row.
withHoverbooleanApply hover style on table row.

#Full Props

export interface TableProps
extends BoxProps<"table">,
StandardComponentProps,
LocalTableProps {}