Basic
Columns plus data — zebra striping is on by default for legibility over long lists.
| Name | Status | |
|---|---|---|
| Alice Johnson | alice@example.com | Active |
| Bob Smith | bob@example.com | Inactive |
| Carol Lee | carol@example.com | Active |
SenTable is a typed, headless-feeling table — give it columns and data, customize cells with a render function, and it stays out of the way.
| Name | Status | |
|---|---|---|
| Alice Johnson | alice@example.com | Active |
| Bob Smith | bob@example.com | Inactive |
| Carol Lee | carol@example.com | Active |
Rice paddies — orderly rows that make the field readable.
Columns plus data — zebra striping is on by default for legibility over long lists.
| Name | Status | |
|---|---|---|
| Alice Johnson | alice@example.com | Active |
| Bob Smith | bob@example.com | Inactive |
| Carol Lee | carol@example.com | Active |
Cleaner for short tables and dense numeric data.
| Name | Status | |
|---|---|---|
| Alice Johnson | alice@example.com | Active |
| Bob Smith | bob@example.com | Inactive |
| Carol Lee | carol@example.com | Active |
Pass onRowClick and rows become focusable buttons. Use the render column option for badges, money, dates, or anything that is not just text.
| Order | Customer | Total | Status |
|---|---|---|---|
| #1042 | Aiko Tanaka | ¥12,800 | paid |
| #1041 | Marcus Lee | ¥4,200 | pending |
| #1040 | Helena Reyes | ¥9,600 | refunded |
| #1039 | Sora Yamamoto | ¥21,000 | paid |
Column keys are constrained to keyof TData — typos surface at compile time, not at runtime.
Drop in any ReactNode per cell — badges, links, formatted dates — without forking the table.
When onRowClick is set, rows become focusable and respond to Enter and Space.
Columns are plain objects, typed against the row data. The render function is the only escape hatch you need.
interface SenTableColumn<TData> {
key: keyof TData // which row property to read
header: string // column heading
align?: 'left' | 'center' | 'right'
render?: (value, row) => ReactNode // custom cell content
}The full shape — typed columns, custom render, click handler.
import SenTable from 'sen-ui/SenTable'
import type { SenTableColumn } from 'sen-ui/SenTable'
type User = { id: number; name: string; email: string; isActive: boolean }
const columns: SenTableColumn<User>[] = [
{ key: 'name', header: 'Name', align: 'left' },
{ key: 'email', header: 'Email', align: 'left' },
{
key: 'isActive',
header: 'Status',
align: 'center',
render: (value) => (value ? 'Active' : 'Inactive'),
},
]
export function UsersTable({ data }: { data: User[] }) {
return (
<SenTable
columns={columns}
data={data}
zebra
onRowClick={(row) => console.log(row.id)}
/>
)
}