Table

The component is a wrapper and replacement for the <table /> component and its children. You can either pass the headers and dataset or pass the children with the whole table (including the <table /> component).

<Table
    animate
    headers={['Prop name', 'Type', 'Default', 'Description']}
    dataset={[
        ['name', 'string', '\'\'', 'The base name of the component'],
        ['age', 'number', '0', 'The age of the component'],
        ['married', 'bool', 'false', 'If the component is married'],
    ]}
/>

Currently only supports rows with columns the same width.

Prop nameTypeDefaultDescription
AnimationanyAnimationComponent
themeanyRequired
classesanyRequired
animatebool
showbooltrue
animationobject
headersarray[]

List of heading titles.

datasetarray[][]

List of rows with their lists of columns.

minWidthunion

The table component can be the 100% width container. Configure the min width of the content, if case the container width is less than this minWidth, a horizontal scroll will appear.

One of type: number, string
childrenany

If the actual HTML <table /> is provided, the headers and dataset are ignored.

Source code: src/Table Open in: Playground