Table displays structured data in a simple, semantic table format, providing full control over layout and styling without built-in data management features. It provides a lightweight, semantic table component built on Radix UI's Table primitives. It renders tabular data with proper HTML structure, supports flexible cell alignment and sizing, and offers complete control over rendering without any built-in data management features like sorting, filtering, or pagination. It's the foundation component that DataTable builds upon, ideal for simple displays, static content, or when you need complete control over table structure and styling.
When to Use Table vs DataTable
Use Table (from @prepared911/ui) when you need:
Simple, static data display (< 50 rows)
No sorting, filtering, or pagination requirements
Custom table layouts or complex styling
Full manual control over table structure
Lightweight tables with minimal overhead
Simple data presentation without interactions
Building custom table functionality from scratch
Rendering markdown or documentation tables
Use DataTable (from @prepared911/ui/data-table) when you need: (see the Data table package API for generated props, Storybook links, and a live preview)
Sorting, filtering, or pagination functionality
Row selection with bulk actions
Expandable rows or hierarchical data
Action menus on each row
Loading states and skeleton screens
Server-side or client-side data management
Large datasets (100+ rows)
Advanced table features and interactions
Props
Table (generated)
Name
Type
Default
Description
aria-description
LocalizedMessage
—
Extended description for assistive tech.
aria-label
LocalizedMessage | DisplayValue
—
Accessible name when the visible label is insufficient.
aria-placeholder
LocalizedMessage
—
Hint for an empty control.
children
ReactNode
—
Table content: {@link TableHeader } and {@link TableBody }.
className
string
—
@deprecated Pass layout through enum props and shipped parts. Request a missing case via find-pattern.
ref
Ref<HTMLTableElement>
—
Ref to the table.
shrink
boolean
false
When true, columns size to their content (table-layout: auto). Otherwise the layout is fixed
and columns share the inline size equally unless a column sets its own.
title
LocalizedMessage | DisplayValue
—
Native tooltip; accessibility hint, not visible UI title text.
Storybook
Interactive examples and edge cases live in Storybook (not duplicated here).