Skip to main content

Examples

Default

Variant — lg (80px rows)

With scroll indicator

Sortable header

With toolbar (bulk select)

Props

Table

Semantic <table> element. Place inside TableScrollArea. Takes no props of its own. Accepts all standard table attributes, including className.

TableBody

<tbody> wrapper. Removes the bottom border on cells in the final row to match the Figma V2 Table Final Row treatment. Takes no props of its own. Accepts all standard thead/tbody/tfoot attributes, including className.

TableCard

Surface wrapper for data tables: rounded 24px container with a strong outer border, inner spacing, and size context for TableCell descendants. Compose with TableScrollArea, Table, TableHeader, TableBody, TableRow, TableHead, and TableCell.
"default" | "md" | "lg" | "condensed"
default:"48"
Row density applied to TableCell descendants.

TableCell

Body cell. v2: h-16 (or h-20 when the parent TableCard uses size="lg"), px-4 py-3 padding, body-sm typography, and a single border-border-primary rule that is zeroed by TableBody for the final row.
"default" | "chip" | "pillProgress"
default:"default"
Padding preset for the cell. v2 uses identical padding across variants; values are kept for back-compat.
"checkbox" | "default" | "stacked" | "multiline" | "sideLabel"
default:"default"
Alignment and typography preset for common cell types.

TableCellContent

Two-line content slot matching Figma V2 Table Content — primary line (semibold) over an optional secondary line (regular, muted) with a 2px gap. Use inside TableCell for the common stacked-text pattern.
ReactNode
required
Primary line (semibold body-sm).
string
Class for the outer wrapper.
ReactNode
Inline node rendered next to the primary line (icon, chip).
ReactNode
Optional secondary line (regular body-sm, secondary color).
ReactNode
Inline node rendered next to the secondary line.

TableCellGroup

Horizontal group for icons, chips, and metadata inside a TableCell (Figma gap-[4px]). Takes no props of its own. Accepts all standard div attributes, including className.

TableFooter

Takes no props of its own. Accepts all standard thead/tbody/tfoot attributes, including className.

TableHead

Header cell. v2: transparent background, 48px min height, tertiary text, border-border-primary bottom rule. Uses 16px semibold type, or 14px when the parent TableCard is size="condensed".
"sort" | "checkbox" | "default" | "leading"
default:"default"
Layout preset for common column types.

TableHeader

Takes no props of its own. Accepts all standard thead/tbody/tfoot attributes, including className.

TableLineClamp

Clamps child text to a fixed number of lines inside a TableCell.
1 | 2 | 3
default:"2"
Number of lines before ellipsis.

TableMediaThumbnail

Square thumbnail used inside TableCell for media columns (Figma V2 Media Thumbnail Item).
string
required
Image URL.
"center" | "start"
default:"start"
center uses the fixed media column width from the lg spec.
string
Alt text for the image.
boolean
default:"false"
Applies the table’s blurred-media treatment.
"32" | "48"
default:"48"
Pixel size of the square thumbnail; "32" matches the current Figma V2 Media Thumbnail Item.

TablePagination

Footer bar for data tables: rows-per-page control, page navigation, and range summary. Pair paginationSlot with Pagination for numbered controls. v2 sits flush inside TableCard (px-3 matches the card’s inner gutter); the chip styling now lives on the TableRowsPerPageSelect trigger itself.
ReactNode
required
Summary text or node (e.g. current range and total).
"mobile" | "desktop"
default:"desktop"
Layout preset.
ReactNode
Left (desktop) or top row (mobile) content, e.g. rows-per-page Select.
ReactNode
Center (desktop) or bottom row (mobile) content, e.g. Pagination.

TablePillProgressLayout

Vertical layout for pill label + TableProgressTrack in a cell. Takes no props of its own. Accepts all standard div attributes, including className.

TableProgressTrack

Thin progress track used with badges in table cells (Figma pill + progress). Renders with role="progressbar" and a default aria-label of "Progress".
number
default:"0"
Fill width from 0–100.

TableRow

Takes no props of its own. Accepts all standard tr attributes, including className.

TableRowsPerPageSelect

Rows-per-page Select styled for TablePagination. v2 uses a subtle pill trigger with the table’s secondary-surface background.
string
default:"Progress"
Accessible name for the trigger when no visible label.
string
Passed to the trigger for forms and labels.

TableScrollArea

Horizontal scroll container for wide tables. The inner scrollport keeps border-collapse styles intact when the table wraps.
boolean
deprecated
No longer needed in v2 — TableCard handles corner rounding via its own overflow-hidden rounded-3xl. Accepted for back-compat.Deprecated. v2 ignores this prop; safe to remove.
boolean
default:"false"
Shows a slim horizontal scrollbar beneath the table when the content overflows (Figma V2 Scroll Bar).

TableSortLabel

Sortable column label. v2 expresses the sort state with a 1px underline beneath the label plus a directional arrow when sorted.
TableSortDirection
Visual indicator of the column’s sort state. When set to "asc" or "desc", a 1px underline accent appears beneath the label and a small directional arrow is shown next to it.

TableStackedText

Two-line primary + secondary text block for “cell + info” patterns.
ReactNode
required
Secondary line (caption, muted).
ReactNode
required
Primary line (semibold body).

TableStatusDot

Small status indicator dot for table cells (Figma status column). Takes no props of its own. Accepts all standard div attributes, including className.

TableToolbar

Optional toolbar row above the table (e.g. bulk selection actions). Takes no props of its own. Accepts all standard div attributes, including className.

Exported types

Also exported from @fanvue/ui: TableBodyProps, TableCardProps, TableCellContentProps, TableCellGroupProps, TableCellIntent, TableCellProps, TableCellVariant, TableFooterProps, TableHeaderProps, TableHeadIntent, TableHeadProps, TableLineClampProps, TableMediaThumbnailProps, TableMediaThumbnailSize, TablePaginationLayout, TablePaginationProps, TablePillProgressLayoutProps, TableProgressTrackProps, TableProps, TableRowProps, TableRowsPerPageSelectProps, TableScrollAreaProps, TableSize, TableSortDirection, TableSortLabelProps, TableStackedTextProps, TableStatusDotProps, TableToolbarProps.
Setup: Installation · Theming