datui
Color scheme

Providers & app

AppRoot

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

import { AppRoot, Portal } from "datui";

Examples

Setup

An embedded, dark, compact-density datui root.

Accessibility

  • Sets lang and dir from ConfigProvider so assistive technology reads content correctly.
  • Overlays portal into AppRoot's layer instead of document.body, so they inherit the theme while Radix still manages focus and aria-hidden on the rest of the page.

API

AppRoot

Root container for datui apps. Applies theme, density, direction and locale to the DOM and hosts the portal layer that overlays render into.

PropTypeDefaultDescription
classNamestring—
density"compact" | "regular"—Force a density instead of deriving it from the viewport and pointer.
mode"full" | "embedded"full`full` fills the viewport and owns page scroll; `embedded` lives inside an existing page and contains its own scroll and overlays.

Portal

PropTypeDefaultDescription
containerHTMLElement—
disabledboolean—Render in place instead of portalling.