Skip to main content

Examples

Default

Interactive rows

Variant — lg (56px rows)

With scroll indicator

Fixed height (rows scroll under the header)

TableMobileRow — Default

TableMobileRow — Without Badge

TableMobileRow — Wrap

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: 12px-radius container with a 0.5px hairline border and no inner padding, so the header, rows and TableCardPagination footer run edge to edge. Provides the size context for TableCell descendants. Compose with TableScrollArea, Table, TableHeader, TableBody, TableRow, TableHead, and TableCell.
"default" | "md" | "lg" | "condensed" | "comfortable"
default:"40"
Row density applied to TableCell descendants: 40px rows for md, default and condensed, 48px for comfortable, 56px for lg.

TableCardPagination

32px footer that closes a TableCard: previous, “1 of N”, next, then a rows-per-page menu, on surface-table-row. Place it after TableScrollArea inside the card.
(page: number) => void
required
Called with the 1-based page to show.
(pageSize: number) => void
required
Called with the new rows-per-page choice.
number
required
Current page, 1-based.
number
required
Total number of pages.
number
required
Rows per page currently shown.
readonly number[]
required
Choices offered in the rows-per-page menu.
((page: number, pageCount: number) => string)
default:"(current, total) => `${current} of ${total}`"
Formats the page indicator.
((pageSize: number) => string)
default:"(size) => `${size} rows`"
Formats a rows-per-page choice.
string
default:"Pagination"
Accessible name of the page navigation.
string
default:"Next page"
Accessible name of the next-page button.
string
default:"Rows per page"
Accessible name of the rows-per-page menu trigger, followed by the current choice (e.g. “Rows per page, 10 rows”).
string
default:"Previous page"
Accessible name of the previous-page button.

TableCell

Body cell: 40px rows (56px when the parent TableCard uses size="lg" or the row holds media), 12px type, transparent background and a 0.5px rule that TableBody drops on the final row. Long text wraps and the row grows; set nowrap on short columns to keep them on one line.
"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.
boolean
default:"false"
Keeps the content on one line, for short values (dates, amounts, statuses).

TableCellContent

Two-line content slot matching Figma V2 Table Content — 12px primary line (semibold) over an optional 12px secondary line (regular, muted), so both fit a 40px row. 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: 32px tall on surface-table-row, 12px secondary text and a 0.5px bottom rule. Columns sit at least 40px apart, with 16px against the card edges.
"sort" | "checkbox" | "default" | "leading"
default:"default"
Layout preset for common column types.

TableHeader

<thead> wrapper. Its header cells stay pinned to the top while rows scroll beneath them. Row header cells in TableBody scroll with their rows. 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 photo that fills its frame, used inside TableCell for media columns. At the 40px and 48px sizes its row grows to 56px; the 32px size fits a regular 40px row.
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" | "40" | "48"
default:"40"
Pixel size of the square thumbnail. At 40 or 48 its row grows to 56px; 32 fits a 40px row.

TableMediaTile

40px tile for a TableCell: a logo or icon (e.g. a social platform) centred on surface-table-row with a 0.5px border, or, with fill, custom media that fills it. Its row grows to 56px. For a plain image URL use TableMediaThumbnail.
ReactNode
required
Logo or icon centred on the tile, or edge-to-edge media when fill is set.
boolean
default:"false"
Lets the child fill the tile edge to edge (e.g. a video preview) with no border or fill.

TableMobileRow

Stacked row that stands in for a table row on narrow screens (Figma V2 Table Mobile): a badge and actions line, then a title with a description, closed by a divider.
ReactNode
required
Primary line (semibold body).
ReactNode
Trailing controls on the badge line, such as a favourite toggle and a navigation IconButton.
ReactNode
Status or type label above the title, typically a Pill.
ReactNode
Secondary line beneath the title (muted).
boolean
default:"false"
When true, the title and description wrap onto more lines instead of truncating.

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

Table row. A body row holding a TableMediaThumbnail or TableMediaTile grows from 40px to 56px to keep 8px around it. Set interactive on rows that open or expand so they respond to hover.
boolean
default:"false"
Marks a body row that opens or expands into more content. The row shows a pointer cursor and eases to background-secondary while hovered, or while a control inside it has keyboard focus. The row itself is not focusable, so its action must also be on a button or link inside it. With a TableRowLink inside, a click anywhere on the row that is not on another control opens that link.

TableRowButton

Action inside a table row (e.g. “Copy”, “View”): a 24px squared secondary Button with 12px semibold type, so it fits a 40px row. Pass 16px filled icons; they take the secondary icon colour.
boolean
default:"false"
Merge props onto a child element instead of rendering a <button>.
string
Old price shown with a strikethrough before the current price.
boolean
default:"false"
When true, the button will take the full width of its container.
ReactNode
Icon element displayed before the label.
boolean
default:"false"
When true, replaces the label with a spinner and disables interaction.
boolean
default:"false"
Forces the dark-surface treatment regardless of theme. Only honored on primary, secondary, tertiary, and outline variants; ignored on all others. Use when placing the button on a dark background in a light theme (e.g. an inverted hero or modal).
string
Current price shown inside the button after the label and icons.
ReactNode
Icon element displayed after the label.
"link" | "text" | "brand" | "primary" | "secondary" | "tertiary" | "outline" | ...
default:"secondary"
Visual style variant of the button.Full type: "link" | "text" | "brand" | "primary" | "secondary" | "tertiary" | "outline" | "destructive" | "secondaryDestructive" | "white" | "alwaysBlack" | "ai" | "tertiaryDestructive".
The link an interactive TableRow opens, usually the row’s name. It is a real link, so the keyboard and “open in a new tab” work as on any link, and it is the row’s one tab stop. A click anywhere else on the row, except on another control, opens it too. A TableRowLink portalled out of the row, in a popover or dialog, is an ordinary link and does not take over the row’s click. Takes no props of its own. Accepts all standard a attributes, including className.

TableScrollArea

Scroll container for the table. Wide tables scroll sideways. When its TableCard has a bounded height (a flex child of a full-height page, or a set height), the rows scroll inside the card under a pinned header and the card’s footer stays in view. The area fills the card’s height, so in a card taller than its rows the footer sits at the bottom of the card.
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), with room reserved for it only while the table is wider than its card.

TableSortLabel

Sortable column label. A sorted column reads primary with the Arrow Sort Up / Down chevrons; an unsorted one keeps the header colour.
TableSortDirection
Visual indicator of the column’s sort state. When set to "asc" or "desc", the label turns primary and the Arrow Sort Up / Down chevrons appear next to it, the active direction highlighted.

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

40px action bar above a TableCard: search on the left, every other control (menus, toggles, buttons) on the right, 24px apart. On phones TableToolbarAction controls go icon-only so the bar fits.
Left slot, usually a TableToolbarSearch.

TableToolbarAction

Labelled control for TableToolbar: 12px label followed by a 16px icon. Its 8px side padding is offset by a negative margin, so the label lines up with text around it and the fill extends 8px past the label. It rests on secondary text, fills with Interaction/Hover on hover and while active, and with Neutral Alphas/100 while the menu or popover it triggers is open (data-state="open"). Below the md breakpoint only the icon shows, and the label stays as the accessible name, so a full bar still fits a phone. Works as a plain button or as a DropdownMenuTrigger or PopoverTrigger child.
boolean
default:"false"
Marks a toggle or filter as on: primary text on the Interaction/Hover fill.
ReactNode
16px icon after the label.

TableToolbarButton

Call to action for TableToolbar (e.g. “Create New”): a 24px Button squared to the toolbar’s 8px radius with 12px semibold type, so it sits 8px from the bar’s edges. Elsewhere use Button.
boolean
default:"false"
Merge props onto a child element instead of rendering a <button>.
string
Old price shown with a strikethrough before the current price.
boolean
default:"false"
When true, the button will take the full width of its container.
ReactNode
Icon element displayed before the label.
boolean
default:"false"
When true, replaces the label with a spinner and disables interaction.
boolean
default:"false"
Forces the dark-surface treatment regardless of theme. Only honored on primary, secondary, tertiary, and outline variants; ignored on all others. Use when placing the button on a dark background in a light theme (e.g. an inverted hero or modal).
string
Current price shown inside the button after the label and icons.
ReactNode
Icon element displayed after the label.
"link" | "text" | "brand" | "primary" | "secondary" | "tertiary" | "outline" | ...
default:"secondary"
Visual style variant of the button.Full type: "link" | "text" | "brand" | "primary" | "secondary" | "tertiary" | "outline" | "destructive" | "secondaryDestructive" | "white" | "alwaysBlack" | "ai" | "tertiaryDestructive".

TableToolbarSearch

Borderless search field for the left slot of TableToolbar: 16px search icon, 12px text and a clear button once there is a query. Pass filters to show the applied filters before the input from the md breakpoint up, each with a × button, and onClearFilters for a “Clear all” action after it. The ones that do not fit collapse into a “+N” tag, so the toolbar never grows. Keep filters defined (an empty array when none apply) so the input is not remounted as filters come and go.
string
required
Accessible name of the clear button.
(value: string) => void
required
Called with the new query, and with "" when cleared.
string
Label of the “Clear all” action. It shows only with onClearFilters and an applied filter.
readonly TableToolbarSearchFilter[]
Applied filters, shown between the search icon and the input from the md breakpoint up. Array order is the priority: the leading filters that fit are shown and the rest collapse into a “+N” tag. Keep it defined (an empty array when none apply) so the input is not remounted as filters come and go.
((count: number) => string)
Accessible text of the “+N” tag, e.g. (count) => \${count} more filters`. Pass it whenever filters` is passed, so the hidden count is announced in words. Without it the tag is read as its visible text.
(() => void)
Called when “Clear all” is pressed. It shows only with clearFiltersLabel and an applied filter.
string
default:"0"
Current query.

TableTruncatedText

One-line text for a TableCell that ends in an ellipsis once it no longer fits, either past maxChars or in a narrower column. The tooltip and the tab stop appear only when the text is actually cut, measured on mount and on every resize, so short text stays plain and out of the tab order. It mounts its own TooltipProvider so it works in apps without one.
string
required
Full text; shown whole in a tooltip whenever it does not fit.
number
default:"25"
Widest the text may grow, in characters, before it ends in an ellipsis.

Exported types

Also exported from @fanvue/ui: TableBodyProps, TableCardPaginationProps, TableCardProps, TableCellContentProps, TableCellGroupProps, TableCellIntent, TableCellProps, TableCellVariant, TableFooterProps, TableHeaderProps, TableHeadIntent, TableHeadProps, TableLineClampProps, TableMediaThumbnailProps, TableMediaThumbnailSize, TableMediaTileProps, TableMobileRowProps, TablePillProgressLayoutProps, TableProgressTrackProps, TableProps, TableRowButtonProps, TableRowLinkProps, TableRowProps, TableScrollAreaProps, TableSize, TableSortDirection, TableSortLabelProps, TableStackedTextProps, TableStatusDotProps, TableToolbarActionProps, TableToolbarButtonProps, TableToolbarProps, TableToolbarSearchFilter, TableToolbarSearchProps, TableTruncatedTextProps.
Setup: Installation · Theming