Navigation
Epic
Tabbed app shell: shows the active story (a View or Root) and a bottom Tabbar. Switching is instant and keeps scroll per story.
import { Epic } from "datui";Examples
With a tabbar
News
Accessibility
- Story content is rendered inside
<main>; theTabbaris a labelled<nav>. - Mark the current tab with
selectedonTabbarItem(setsaria-current="page"). - Pressing a tab keeps focus on the tab; scroll position is saved and restored per story.
API
Epic
Tabbed app shell: shows the active story inside `<main>` and the `tabbar` below. Switching is instant; scroll is kept per story.
| Prop | Type | Default | Description |
|---|---|---|---|
| activeStory (required) | string | — | Id of the story (`View` or `Root`) to show. |
| className | string | — | |
| contentAs | ElementType<any, keyof IntrinsicElements> | main | Element wrapping the active story. Use `div` when the page already has a `<main>`. |
| tabbar | ReactNode | — | Bottom navigation, usually a `Tabbar`. Stays pinned to the bottom of the viewport or scroll container. |