Skip to content

Layout

Layout

Multi-pane page shell with header, side panels, and scrollable content.

import { Layout } from '@var-ui/react';

Layout

Multi-pane page shell for tool UIs: optional header/footer bands and a horizontal middle row for start, content, and end zones. Pair with LayoutContent and LayoutPanel for master-detail inspectors.

Examples

Default

Demo.tsxTSX
import { useState } from 'react';
import {
  Button,
  Layout,
  LayoutContent,
  LayoutPanel,
  useResizable,
} from '@var-ui/react';

const { end } = useResizable({
  regions: { end: { defaultWidth: 280, minWidth: 220, maxWidth: 400 } },
});

<Layout
  height="auto"
  padding="none"
  content={<LayoutContent padding="none">{/* list */}</LayoutContent>}
  end={
    <LayoutPanel resizable={end} hasResizeHandle label="Details" role="complementary">
      Inspector
    </LayoutPanel>
  }
/>

Props

Accessibility

Use role and label on LayoutContent and LayoutPanel when multiple landmarks of the same type appear on a page.