SuperdindaDocs
Backoffice

DataTable

Playground

Um preset por valor do primeiro eixo do Figma. Mude as props; dsState força hover, foco ou pressionado, como na matriz.

Backoffice / Table Header Cell

Lotação

Variantes, tamanhos e estados

Cada célula é o componente real, marcada com a variante do Figma que reproduz (passe o mouse pra ver o node).

Sort · None

AlignDefaultHoverFocus
Start
Lotação
End
Lotação

Sort · Sortable

AlignDefaultHoverFocus
Start
End

Sort · Ascending

AlignDefaultHoverFocus
Start
End

Sort · Descending

AlignDefaultHoverFocus
Start
End

Props

As props que o arquivo do DS declara. O componente também repassa as do primitivo (base-ui), quando ele tem um.

DataTableRootProps

PropTipoPadrãoDescrição
string—Classes of the card that scrolls (the table's own className styles the table).
string—

DataTableHeadProps

PropTipoPadrãoDescrição
SortDirection—Figma "Sort": omit for a plain header; "none" = sortable, not sorted.
"end" | "start""start"Figma "Align": End for numbers (money, counts).
(() => void)—Toggles the sort; makes the label a button.
string—
ReactNode—

DataTableRowProps

PropTipoPadrãoDescrição
boolean | nullfalse
boolean | nullfalse
(() => void)—Opens the row (its detail): the row takes clicks and Enter. Give the row's first cell a link too when the detail is a page.
React.KeyboardEventHandler<HTMLTableRowElement>—
string—

DataTableCellProps

PropTipoPadrãoDescrição
"actions" | "custom" | "money" | "mono" | "muted" | "status" | "strong" | "text" | "time" | "two-line" | null"text"
ReactNode—Figma "secondary": the second line of a Two-line cell (an e-mail, a uid).
string—
ReactNode—

DataTableSelectProps

PropTipoPadrãoDescrição
booleanfalseHeader cell (`<th>`) instead of a body cell.
booleanfalseSome rows selected (header only).
string—

On this page