Table
The Table component is used to display data in a structured format with rows and columns. It supports various features such as sorting, and customizable styling.
Installation
Install the package
npm i @start-base/start-ui
Add the styles
To use the React form elements styles in a Next.js project, import the styles in your layout.tsx
file.
app/layout.tsx
import "@start-base/start-ui/styles.css";
Import the component
import Table from '@start-base/start-ui/Table';
Usages
Table Default
Name | Age | |
---|---|---|
John Doe | 28 | [email protected] |
Jane Smith | 34 | [email protected] |
Alice Johnson | 45 | [email protected] |
Table With Custom Empty Text
Name | Age | |
---|---|---|
Custom empty text |
API
Name | Type | Default | Variants | Description |
---|---|---|---|---|
columns | array | Columns of the table | ||
data | array | Data of the table | ||
emptyText | string | Empty text of the table | ||
rowClassName | string | Row class name of the table |