datui
Color scheme

datui

99 accessible React components with design tokens, light and dark themes and keyboard support. Every one of them is live below.

pnpm add datui

Providers & app

AdaptivityProvider

Exposes viewport size classes and input capabilities via useAdaptivity(). Values are detected from media queries; the provider overrides them for a subtree.

viewWidth
desktop
sizeX
regular
sizeY
compact
hasPointer
true
hasHover
true
isDesktop
true

AppRoot

Root container that applies theme, density, direction and locale to the DOM and hosts the portal layer overlays render into.

An embedded, dark, compact-density datui root.

ConfigProvider

App-wide settings: color scheme, locale, text direction and transition motion. ColorSchemeProvider, LocaleProvider and DirectionProvider are also available on their own.

light scheme

useColorScheme(): light

dark scheme

useColorScheme(): dark

Primitives

FocusTrap

Keeps keyboard focus inside its children. datui overlays use it internally; use it for custom popups.

Tappable & Clickable

Clickable renders the right interactive element for its props; Tappable adds hover, press, focus and disabled feedback. Buttons, cells and tabs are built on them.

VisuallyHidden

Hides content visually while keeping it available to assistive technology.

Layout

AspectRatio

Box locked to an aspect ratio; children stretch to fill.

16 / 9
Square, children not stretched

Box

Generic layout element with padding, margin and size props on the spacing scale.

padding="l", maxWidth={360}, rendered as a section

CardGrid

Responsive grid of cards.

  • s card 1
  • s card 2
  • s card 3
  • m card 1
  • m card 2
  • m card 3
  • l card 1
  • l card 2
  • l card 3

FixedLayout

Pins content (a search bar, a bottom action) to the top or bottom of its panel while the rest scrolls.

Checkout

  • Item 1
  • Item 2
  • Item 3
  • Item 4
  • Item 5
  • Item 6
  • Item 7
  • Item 8
  • Item 9
  • Item 10
  • Item 11
  • Item 12

Flex

Flexbox container with gaps on the spacing scale, plus FlexItem for sizing children.

One
Two
Three
Four
Five

Footer

Centered secondary text at the end of a list or section.

List content…
12 friends

Gradient

Background fade block toward the top or bottom.

Caption

Group

Content section — card or plain — with header, description and separators between siblings.

Contact

Phone: +1 555 0100
Email: mia@example.com
Only friends can see this.

Plain group

OneTwoThree

Header

Section heading with subtitle, indicator and before/after slots.

Overview

Your profile at a glance

Friends

24
Show all

Favorites

Pinned by you

Settings

HorizontalScroll

A horizontal strip that scrolls natively and adds prev/next arrows for pointer users. Arrows hide at the start and end.

Separator

Thin divider line, horizontal or vertical, optionally inset with the standard gutter.

primary
secondary, with padding
alpha, size l

SimpleGrid

CSS grid with a fixed number of equal columns, or as many columns as fit a minimum width.

1
2
3
4
5
6

Spacing

Empty vertical spacer on the spacing scale (3xs…4xl), a px number or any CSS length.

above · 2xs
above · m
above · 2xl
end

SplitLayout

Multi-column app shell: a sidebar and content columns with width bounds, an optional header row and sticky columns.

Feed

Content column.

Typography

Mark

Highlights a fragment of text, such as a search match.

Results for “token”: design tokens define colors, radii and spacing.

Typography

Semantic text presets on datui's type scale: DisplayTitle, Title, Headline, Text, Paragraph, Subhead, Footnote, Caption and EllipsisText.

Display title

Title 1

Title 2

Title 3

Headline 1

Headline 2

Text — default body copy

Paragraph — multi-line copy for longer descriptions and articles.

SubheadFootnoteCaption 1Caption 2Caption 3

Buttons

Button

The main action control. Renders a native button, or a link when given href.

ButtonGroup

Lays out related buttons in a row or column with a consistent gap.

CellButton

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

ToolButton

Toolbar button with a density-adaptive icon and optional text.

Forms

Calendar

Month grid date picker with month/year pickers, disabled dates, locale-aware labels and optional time. CalendarHeader is its navigation bar.

CalendarRange

Range picker: first click sets the start, second the end, with a hover preview of the pending range. Two months on wide screens.

Checkbox

Labelled checkbox row with description and indeterminate state, plus a bare CheckboxInput.

Chip

Compact token with optional slots and a remove button. Used by ChipsInput and ChipsSelect.

DesignResearchEngineeringSecondaryDisabledRead-only

ChipsInput

Free-form tag input: Enter or a delimiter turns typed text into chips.

  • react
  • tailwind
Press Enter or type a comma to add

ChipsSelect

Multi-select with chips and a filterable dropdown, optionally creatable.

  • TypeScript

CustomSelect

Styled select / combobox with a positioned listbox: type-ahead, optional search, async loading, groups, custom options and a clear button.

Moscow is unavailable

DateInput

Segmented date (and optional time) field with a calendar popover.

DD.MM.YYYY

DateRangeInput

Segmented start – end date field with a range calendar popover.

Check-in – check-out

DropZone

Drag-and-drop target that highlights while files are dragged over it.

Drop images or press to browse
Drop target only

No files yet

File

Button that opens the native file picker.

No files selected

FormField

Bordered shell shared by text-like controls, with before/after slots, status and plain mode.

FormItem

Field wrapper with label, helper or error text, required marker and optional remove action.

We never share it

FormLayoutGroup

Groups FormItems vertically or side by side, optionally joined into one segmented field.

FormStatus

Form-level message such as a submit error.

Draft saved
Changes are kept on this device.

Input

Single-line native text input inside a FormField.

0 characters
€

NativeSelect

Styled native <select> with placeholder and select types.

RadioGroup

Single choice between labelled Radio options with roving arrow-key focus.

Removable

Wraps a row or field with a remove action: a trailing ✕ button, or a two-step reveal that shows a destructive Remove button.

anna@example.com
ben@example.com
owner@example.com (can't be removed)

Search

Search field with clear button, trailing icon button, find button and an after slot.

SegmentedControl

Exclusive choice between a few options with a sliding indicator.

Select

Adaptive select driven by an options array: CustomSelect with a mouse, the platform picker (NativeSelect) on touch devices.

SelectMimicry

Looks like a select but is a button that opens something else, e.g. a modal picker.

Slider

Single value or range slider with optional value tooltip.

Switch

On/off toggle.

Textarea

Multi-line native textarea that grows with its content.

WriteBar

Message composer: an auto-growing textarea with action slots and preset icon buttons.

    Data display

    Accordion

    A single expandable section: an Accordion.Summary row that toggles an animated Accordion.Content body.

    Unlimited projects, 100 GB of storage and priority support.

    Avatar

    Round image for a person or entity, with initials or icon fallback.

    Badge

    Tiny dot indicator placed next to a title or icon.

    Updates NewAlerts Important

    Banner

    Promo or announcement block with actions and dismiss/chevron.

    Try the new editorFaster, with offline drafts.
    Storage almost fullTap to manage
    Summer saleUp to 50% off

    Card

    Plain surface for grouping content.

    tint
    shadow
    outline
    outline-tint
    plain

    CardScroll

    A horizontally scrolling list of cards with snapping, optional gutters and arrows that move by one card. Built on HorizontalScroll.

    • Card 1
    • Card 2
    • Card 3
    • Card 4
    • Card 5
    • Card 6
    • Card 7
    • Card 8
    • Card 9
    • Card 10
    • Card 1
    • Card 2
    • Card 3
    • Card 4
    • Card 5
    • Card 6
    • Card 7
    • Card 8
    • Card 9
    • Card 10
    • Card 1
    • Card 2
    • Card 3
    • Card 4
    • Card 5
    • Card 6
    • Card 7
    • Card 8
    • Card 9
    • Card 10

    Cell

    A SimpleCell with list-editing modes: selectable (checkbox or radio), removable, and draggable reordering inside List.

    ContentBadge

    Label pill for status or category, with optional icons.

    accentneutralpositivenegativecustom
    accentneutralpositivenegativecustom
    accentneutralpositivenegativecustom
    STopLarge

    Counter

    Small count pill used in tabs, buttons and cells.

    121212123
    121212123
    121212123
    121212123

    Gallery

    A swipeable carousel of slides with snapping, bullets, arrows, looping and optional autoplay. Built on embla-carousel.

    Slide 1
    Slide 2
    Slide 3
    Slide 4

    GridAvatar

    Round avatar built from up to four images, for group chats.

    HorizontalCell

    Vertical tile — media on top, text below — for horizontally scrolling lists.

    Image

    Rounded-rectangle thumbnail with fallback icon, badges, overlay and floating elements.

    HD

    InfoRow

    Label and value pair.

    Birthday: May 1, 1995
    City: Lisbon

    MiniInfoCell

    Compact info line with a small icon, for profile details, "Add info" and "Show more" rows.

    Lives in Lisbon

    Placeholder

    Empty state with icon, title, description and action.

    No messages

    Conversations you start appear here.

    RichCell

    Taller row for rich content: large media, title with meta, subtitles, a bottom slot and action buttons below.

    Report.pdf Long subtitles wrap onto more lines when multiline is set, instead of being truncated.

    SimpleCell

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

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

    UsersStack

    Overlapping avatars with a "+N" counter and caption.

    Mia, Leo and 4 others
    6 people going
    Liked by Ava and 5 others

    Overlays

    ActionSheet

    A list of actions: a menu anchored to its toggle on regular width, a bottom sheet with a Cancel row on compact width.

    Alert

    Blocking confirmation dialog with a title, description and a row of actions.

    ModalCard

    Small modal for one message or decision: icon, title, description and actions. A centered card on regular width, docked to the bottom on compact width.

    ModalPage

    Modal panel with header, scrollable content and footer. A centered dialog on regular width and a draggable bottom sheet on compact width.

    OnboardingTooltip

    Spotlight hint for onboarding: points at an element and blocks the page until dismissed.

    Popover

    Floating panel anchored to a trigger, for arbitrary interactive content.

    Tooltip

    Short hint shown on hover and focus of its anchor. Not for essential content.

    Feedback

    PanelSpinner

    Spinner centered in a full-width block for a loading panel or section.

    Loading…
    Loading comments…

    Progress

    Determinate linear progress bar.

    PullToRefresh

    Pull-down-to-refresh for touch devices. Calls onRefresh after a long enough pull at the top of the page and shows a spinner until isFetching turns false.

    • First post
    • Second post
    • Third post

    ScreenSpinner

    Full-screen blocking loader that can turn into a done, error or custom icon, or offer cancel.

    Uploading
    Uploaded
    Failed

    Skeleton

    Shimmering placeholder for content that is loading.

    Snackbar

    Temporary notification with an optional action. Hides after duration; swipe or Escape dismisses it.

    Conversation archived

    Spinner

    Indeterminate loading indicator that inherits the current text color.

    Loading…Loading…Loading…Loading…