datui
Color scheme

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.
  • reverseColumns only changes the visual order (CSS flex-direction); reading and Tab order follow the DOM.
  • SplitCol animate={false} turns off View/Root transitions inside the column.

API

SplitLayout

Multi-column app shell. Children are `SplitCol`s.

PropTypeDefaultDescription
centerbooleanfalseCenter the columns horizontally.
classNamestring—
headerReactNode—Row above the columns, usually a `PanelHeader` or app bar.
reverseColumnsbooleanfalseSwap 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.

PropTypeDefaultDescription
animatebooleantrueAnimate `View`/`Root` transitions inside this column.
asElementType<any, keyof IntrinsicElements>divElement to render, e.g. `nav`, `aside` or `main`.
autoSpacedbooleanfalseAdd side gutters from tablet width up.
classNamestring—
fixedbooleanfalseKeep the column's content pinned to the viewport (sticky, scrolls on its own).
maxWidthstring | number—
minWidthstring | number—
stretchedOnMobilebooleanfalseTake the full width below tablet width, ignoring `width` bounds.
widthstring | number—