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 itsPanelHeadertitle, so it shows up as a named region. - The
idis used byView; it is not written to the DOMidattribute (it appears asdata-panel).
API
Panel
One screen inside a `View`. Labelled by its `PanelHeader` title.
| Prop | Type | Default | Description |
|---|---|---|---|
| id (required) | string | — | Id used by `View` (`activePanel`, `history`). |
| centered | boolean | false | Center the content vertically and horizontally (empty states, splash screens). |
| className | string | — | |
| disableBackground | boolean | false | Leave the background transparent. |
| mode | PanelMode | — | `card` on tablet width and up, `plain` below, unless set. |