datui
Color scheme

Buttons

CellButton

Full-width list-row button with the cell layout. CellButtonGroup stacks several into one rounded block.

import { CellButton, CellButtonGroup, CellButtonGroupSeparator } from "datui";

Playground

<CellButton appearance="accent">Add member</CellButton>

Examples

Appearances

accent, neutral and negative; centered for lone actions.

Group

CellButtonGroup.Separator draws an inset line between rows.

Accessibility

  • Always a <button type="button"> (or <a> with href); Enter and Space activate natively.
  • Title and subtitles are separated by spaces, so the accessible name reads "Add member Up to 10 people".
  • disabled sets the native attribute. The chevron is aria-hidden.
  • Give CellButtonGroup role="group" and an aria-label when the set of actions needs a name. Separators are decorative.

API

CellButton

Full-width list-row button. Renders `<button>`, or `<a>` with `href`.

PropTypeDefaultDescription
activatedboolean—Keep the pressed look, e.g. for the active item of a list.
afterReactNode—Trailing content, e.g. a switch, counter or button-free text.
appearance"accent" | "negative" | "neutral"accentColor of the title and icons.
asElementType<any, keyof IntrinsicElements>—Element to render. Defaults to `a` with `href`, `button` with `onClick`, otherwise `div`.
badgeAfterSubtitleReactNode—
badgeAfterTitleReactNode—
badgeBeforeSubtitleReactNode—
badgeBeforeTitleReactNode—
beforeReactNode—Leading content, e.g. an icon or avatar.
centeredbooleanfalseCenter the content, e.g. for a lone "Log out" row.
chevronbooleanfalseShow a trailing chevron for navigational rows.
chevronSize"s" | "m""m"
classNamestring—
disabledboolean—
extraSubtitleReactNode—
hrefstring—
indicatorReactNode—Secondary value shown before `after`, e.g. the current setting.
multilinebooleanfalseWrap long text instead of truncating it.
overTitleReactNode—Small text above the title.
relstring—
subtitleReactNode—
targetstring—
type"button" | "submit" | "reset"—

CellButtonGroup

Stacks CellButtons into one rounded block. Pass `role="group"` and `aria-label` when the group needs a name.

PropTypeDefaultDescription
classNamestring—

CellButtonGroupSeparator

Inset horizontal line between CellButtons in a group.

PropTypeDefaultDescription
appearance"primary" | "secondary" | "alpha"—`primary` is a solid line, `secondary` is lighter, `alpha` is translucent for colored surfaces.
classNamestring—
decorativebooleantruePurely visual (default) or a semantic `role="separator"`.
sizestring | number—Space the separator occupies across its line; the line is centered in it.