Table preserves native HTML table semantics and adds an optional responsive overflow container without owning data-grid behavior.
Overview and decision boundary
Use Table to present structured records for scanning, comparison, and repeated operations.
Do not use Table for layout grids or card collections.
Ethan Lee
VP Sales
Active
ethan@acme.com
John Smith
CTO
Active
john@acme.com
Kate Moore
CEO
Active
kate@acme.com
Lena Ortiz
COO
Active
lena@acme.com
1 to 4 of 8 results
1import{ArrowUp,ChevronDown}from"@nerio-ui/adapters/icons";2import{Pagination,Table,TableBody,TableCell,3TableContainer,TableHead,TableHeader,TableRow}from"@nerio-ui/ui";4import{Button,Checkbox}from"@nerio-ui/ui/client";56<divclassName="table-shell">7<TableContaineraria-label="Team members">8<Table>9<TableHeader>10<TableRow>11<TableHeadaria-label="Select rows">12<Checkboxaria-label="Select all rows on this page"/>13</TableHead>14<TableHeadaria-sort="ascending">15<ButtontrailingIcon={ArrowUp}variant="ghost">Name</Button>16</TableHead>17<TableHeadaria-sort="none">18<ButtontrailingIcon={ChevronDown}variant="ghost">Role</Button>19</TableHead>20<TableHeadaria-sort="none">21<ButtontrailingIcon={ChevronDown}variant="ghost">Status</Button>22</TableHead>23<TableHeadaria-sort="none">24<ButtontrailingIcon={ChevronDown}variant="ghost">Email</Button>25</TableHead>26</TableRow>27</TableHeader>28<TableBody>...</TableBody>29</Table>30</TableContainer>31<divclassName="table-footer">32<span>1 to 4of8 results</span>33<Paginationpages={pages}/>34</div>35</div>
Installation and imports
Install the editable registry source, or use the matching package entrypoint when the product keeps Nerio as a workspace dependency.
1import{ArrowUp,ChevronDown}from"@nerio-ui/adapters/icons";2import{Pagination,Table,TableBody,TableCell,3TableContainer,TableHead,TableHeader,TableRow}from"@nerio-ui/ui";4import{Button,Checkbox}from"@nerio-ui/ui/client";56<divclassName="table-shell-secondary">7<TableContaineraria-label="Team members">8<Table>9<TableHeader>10<TableRow>11<TableHeadaria-label="Select rows">12<Checkboxaria-label="Select all rows on this page"/>13</TableHead>14<TableHeadaria-sort="ascending">15<ButtontrailingIcon={ArrowUp}variant="ghost">Name</Button>16</TableHead>17<TableHeadaria-sort="none">18<ButtontrailingIcon={ChevronDown}variant="ghost">Role</Button>19</TableHead>20<TableHeadaria-sort="none">21<ButtontrailingIcon={ChevronDown}variant="ghost">Status</Button>22</TableHead>23<TableHeadaria-sort="none">24<ButtontrailingIcon={ChevronDown}variant="ghost">Email</Button>25</TableHead>26</TableRow>27</TableHeader>28<TableBody>...</TableBody>29</Table>30</TableContainer>31<divclassName="table-footer">32<span>1 to 4of8 results</span>33<Paginationpages={pages}/>34</div>35</div>
Recipe / mode
Contract
Primary composition
Muted consumer-owned frame, inset row group, and Pagination footer on the same surface; this is a composition recipe, not a Table prop.
Secondary composition
Muted rounded header with open page-level rows and footer; this is a composition recipe, not a Table prop.
Plain
Responsive overflow wrapper with no region or tab stop.
Named
aria-label or aria-labelledby exposes an optional non-focusable region.
Focusable
focusable={true} opts into one keyboard-scroll region only when aria-label or aria-labelledby is a non-empty runtime string.
Anatomy
Slot
Native element / purpose
container
Optional div overflow region; directly wrap one Table and never nest containers.
root / caption
table and caption preserve the table's accessible name and description.
header / body / footer
thead, tbody, and tfoot retain native row-group semantics.
row / head / cell
tr, th, and td forward scope, headers, colSpan, rowSpan, aria-sort, and data attributes.
Keep sorting, filtering, pagination, selection, and advanced table behavior out of this Core primitive.
TableContainer is plain by default; focusable={true} creates a tab stop only when aria-label or aria-labelledby is a non-empty runtime string.
TableContainer owns its region role, tab stop, focusable marker, and normalized accessible-name attributes after consumer props are spread.
Hover, focus-within, selected, and current styling applies only to tbody rows; aria-current="false" remains neutral and header/footer rows remain stable.
TableCell text wraps by default; opt into nowrap only for bounded identifiers or short values.
Directly wrap one Table in TableContainer and never nest scroll containers.
Keep row links and actions independently labelled instead of making the whole row clickable.
API
Part
Props
Purpose
Table
TableHTMLAttributes
Native table props, caption relationships, direction, and data attributes.
TableContainer
focusable, aria-label, aria-labelledby
Optional horizontal overflow and runtime-safe named keyboard region; owned region props cannot be overridden.
TableHead
ThHTMLAttributes
scope defaults to col and remains overrideable for row or grouped headers.
TableCell
TdHTMLAttributes
Wraps text by default and forwards headers, colSpan, rowSpan, numeric alignment, values, and actions.
Implementation contract
Table is server-safe and owns presentation only. Sorting, filtering, selection, pagination state, resizing, reordering, virtualization, bulk actions, and fetching stay consumer-owned or belong to Nerio Pro. Consumer sticky headers and columns can use position: sticky on cells; the component adds no transform, isolation, or table clipping. If vertical stickiness is needed, give the single TableContainer an explicit block-size and vertical overflow instead of nesting another scroller.
Styling contract
Contract
Value
Authoring
Complete, statically detectable Tailwind CSS v4 recipes own component visuals.
Values
Semantic and component --n-* variables remain the canonical customization layer.
Overrides
Customizable slots merge consumer className values with tailwindCn so conflicting utilities resolve deterministically.
Residual CSS
Only shared keyframes and scoped no-Preflight compatibility rules remain; there is no parallel visual selector layer.
Design notes
Use Table to present structured records for scanning, comparison, and repeated operations.
Do / do not
Do
Keep the default text wrapping for readable records, use native headers and captions, keep row links or actions as separately labelled controls, and expose sortable state with aria-sort.
Do not
Make the entire row clickable, nest scroll containers, or move DataGrid behavior into this primitive.