Layout

Layout

A composable page shell with Layout, Header, Sider, Content, and Footer. Supports collapsible sidebars with responsive breakpoints.

Dashboard

Main content area

© 2026 Benflux UI

Collapsible Sider

Click the arrow to collapse the sidebar.

Installation

npx benflux-ui add app-layout

Import

import { Layout, Header, Sider, Content, Footer } from "@benflux-ui/react"

Props — Layout

PropTypeDefaultDescription
hasSiderbooleanfalseSet to true when the layout contains a Sider. Switches flex direction to row.
children*ReactNodeLayout children: Header, Sider, Content, Footer

Props — Sider

PropTypeDefaultDescription
widthnumber | string200Width of the sidebar when expanded
collapsedWidthnumber | string64Width when collapsed
collapsiblebooleanfalseShow the collapse/expand trigger button
collapsedbooleanControlled collapsed state
defaultCollapsedbooleanfalseInitial collapsed state (uncontrolled)
onCollapse(collapsed: boolean) => voidCalled when the sidebar is toggled
breakpoint"xs" | "sm" | "md" | "lg" | "xl" | "2xl"Auto-collapse below this viewport width
theme"light" | "dark""light"Color theme of the sidebar
triggerReactNode | nullCustom collapse trigger. Pass null to hide it.

Props — Header / Footer

PropTypeDefaultDescription
heightnumber | stringHeader: 64Fixed height of the element