Layout
SplitLayout
Multi-column app shell: a sidebar and content columns with width bounds, an optional header row and sticky columns.
import { SplitLayout, SplitCol } from "datui";Examples
Sidebar and content
SplitCol with width stays fixed; without it the column fills the rest. stretchedOnMobile takes the full width below tablet.
Feed
Content column.
Accessibility
- Render columns as landmarks with
as(nav,aside,main) so screen-reader users can jump between them. reverseColumnsonly changes the visual order (CSSflex-direction); reading and Tab order follow the DOM.SplitCol animate={false}turns offView/Roottransitions inside the column.
API
SplitLayout
Multi-column app shell. Children are `SplitCol`s.
| Prop | Type | Default | Description |
|---|---|---|---|
| center | boolean | false | Center the columns horizontally. |
| className | string | — | |
| header | ReactNode | — | Row above the columns, usually a `PanelHeader` or app bar. |
| reverseColumns | boolean | false | Swap the visual order of the columns. DOM (reading) order stays the same. |
SplitCol
A column of `SplitLayout` with width bounds and an optional sticky (fixed) mode.
| Prop | Type | Default | Description |
|---|---|---|---|
| animate | boolean | true | Animate `View`/`Root` transitions inside this column. |
| as | ElementType<any, keyof IntrinsicElements> | div | Element to render, e.g. `nav`, `aside` or `main`. |
| autoSpaced | boolean | false | Add side gutters from tablet width up. |
| className | string | — | |
| fixed | boolean | false | Keep the column's content pinned to the viewport (sticky, scrolls on its own). |
| maxWidth | string | number | — | |
| minWidth | string | number | — | |
| stretchedOnMobile | boolean | false | Take the full width below tablet width, ignoring `width` bounds. |
| width | string | number | — |