Layout API
import { Layout } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
asideWidth | string | |
children | React.ReactNode | |
collapsed | boolean | |
density | LayoutDensity | |
drawerBreakpoint | number | Viewport width (px) at and below which the drawer is used. Default 980. |
headless | boolean | |
inset | boolean | variant="shell" only: header and sidebar on a tinted canvas, the content on a raised card. Pair with Sidebar variant="inset". |
maxWidth | LayoutMaxWidth | |
mobileSidebar | 'drawer' | 'stack' | Narrow screens: drawer turns the sidebar into an off-canvas drawer with a backdrop, opened by AppHeader's menu button or sidebarOpen; stack puts it above the content. Defaults to drawer for variant="shell" and stack otherwise. |
mode | LayoutMode | |
onLayoutChange | () => void | |
onSidebarOpenChange | (open: boolean, detail: { source: string }) => void | |
sidebarLabel | string | Accessible name of the drawer. Default "Navigation". |
sidebarOpen | boolean | The drawer is open. With onSidebarOpenChange it is controlled. |
sidebarSide | LayoutSidebarSide | |
sidebarWidth | string | |
variant | LayoutVariant |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Layout.Header props
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Layout.Sidebar props
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Layout.Content props
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Layout.Aside props
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Layout.Footer props
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-layout>
Layout renders the ui-layout custom element from @editora/ui-core, which can also be used without React.
Attributes: aside-width, collapsed, density, drawer-breakpoint, headless, inset, max-width, mobile-sidebar, mode, sidebar-open, sidebar-side, sidebar-width, variant
Events: layoutchange, sidebar-open-change