Table
Semantic table elements with a fluid highlight across rows.
Installation
Import from the Reflow workspace package.
Playground
Open demoimport { Table, TableBody, TableRow, TableCell } from '@rtzll/reflow'
import { type Handle } from 'remix/component'
export function Example(handle: Handle) {
return () => (
<>
<Table>
<TableBody><TableRow><TableCell>Workspace</TableCell></TableRow></TableBody>
</Table>
</>
)
}Empty
import { Table, TableHeader, TableRow, TableHead, TableBody, TableEmpty, Button } from '@rtzll/reflow'
import { type Handle } from 'remix/component'
export function Example(handle: Handle) {
return () => (
<>
<Table>
<TableHeader><TableRow><TableHead>Name</TableHead><TableHead>Role</TableHead></TableRow></TableHeader>
<TableBody><TableEmpty colSpan={2} title="No members yet" description="People you invite show up here." action={<Button variant="secondary" size="compact">Invite people</Button>} /></TableBody>
</Table>
</>
)
}Selected rows
import { TableRow, TableCell } from '@rtzll/reflow'
import { type Handle } from 'remix/component'
export function Example(handle: Handle) {
let selected: string[] = []
return () => (
<>
<TableRow selected><TableCell>Alice</TableCell><TableCell>Engineer</TableCell></TableRow>
</>
)
}API Reference
Public props for the Reflow implementation. Native controls also accept their standard HTML attributes and Remix event mixes.
Table
| Prop | Type | Default | Description |
|---|---|---|---|
children | RemixNode | — | Child nodes to render inside the element. |
size | "default" | "compact" | — | Control density or icon-button dimensions. |
fluidHover | boolean | true | Enables the shared moving hover surface. |
TableRow
| Prop | Type | Default | Description |
|---|---|---|---|
children | RemixNode | — | Child nodes to render inside the element. |
selected | boolean | — | Marks the item as selected. |
hover | boolean | true | Enables row hover feedback. |
TableEmpty
| Prop | Type | Default | Description |
|---|---|---|---|
colSpan* | number | — | Number of table columns the empty state spans. |
title | RemixNode | — | Heading displayed by the component. |
description | RemixNode | — | Additional explanatory text. |