UI
Table
Sortable data table with striped rows, borders, compact mode, and custom cell renderers.
Quick Preview
| Name | Role | Status | |
|---|---|---|---|
| Alex Johnson | alex@example.com | Admin | Active |
| Maria Garcia | maria@example.com | Editor | Active |
| Sam Lee | sam@example.com | Viewer | Inactive |
Installation
# No extra dependencies
// Copy component fromsrc/components/ui/Table.tsx
Usage
import Table from '@/components/ui/Table'<Tablecolumns={[{ key: 'name', label: 'Name' },{ key: 'email', label: 'Email' },]}data={users}stripedbordered/>
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
columns* | TableColumn<T>[] | - | Column definitions with key, header, and optional render |
data* | T[] | - | Array of row data |
striped | boolean | false | Alternating row colors |