datui
Color scheme

Data display

SimpleCell

Base list row with before/after slots, title, subtitles, indicator and chevron. Becomes a button with onClick or a link with href.

import { SimpleCell } from "datui";

Playground

Notifications Sounds, badges On
<SimpleCell subtitle="Sounds, badges" indicator="On" chevron chevronSize="m">Notifications</SimpleCell>

Examples

Slots

Every slot is optional; text truncates unless multiline.

Multiline row with a long title that wraps instead of truncating This subtitle wraps onto several lines instead of being cut with an ellipsis.

Navigation rows

chevron and indicator for settings-style lists.

Notifications

Accessibility

  • Renders <button type="button"> with onClick, <a> with href, otherwise a plain <div>.
  • Title, subtitle and indicator are separated by spaces so the accessible name reads naturally.
  • The chevron is decorative (aria-hidden) and mirrors in right-to-left layouts.
  • Truncated text keeps its full content in the DOM, so screen readers read all of it.
  • Don't put buttons or links inside an interactive SimpleCell; use Cell modes or RichCell actions instead.

API

SimpleCell

Base list row: before slot, title with badges, subtitle lines, indicator, after slot and chevron. Renders a `button` with `onClick`, an `a` with `href`, otherwise a `div`.

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.
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.
chevronbooleanfalseShow a trailing chevron for navigational rows.
chevronSize"s" | "m"m
classNamestring—
disabledboolean—
extraSubtitleReactNode—
hasActivebooleantrueBackground tint while pressed.
hasHoverbooleantrueBackground tint on hover.
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"—