datui
Color scheme

Navigation

Panel

One screen inside a View. Plain on phones, a card on tablet width and up.

import { Panel } from "datui";

Examples

Plain and card

mode is chosen from the viewport unless set.

Plain

Edge to edge, separator under the header.

Card

Rounded surface, spacing under the header.

Centered

centered for empty states and splash screens.

No messages yet

Accessibility

  • Renders a <section> labelled by its PanelHeader title, so it shows up as a named region.
  • The id is used by View; it is not written to the DOM id attribute (it appears as data-panel).

API

Panel

One screen inside a `View`. Labelled by its `PanelHeader` title.

PropTypeDefaultDescription
id (required)string—Id used by `View` (`activePanel`, `history`).
centeredbooleanfalseCenter the content vertically and horizontally (empty states, splash screens).
classNamestring—
disableBackgroundbooleanfalseLeave the background transparent.
modePanelMode—`card` on tablet width and up, `plain` below, unless set.