Skip to main content
Version: Next

Layout API

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

Props​

PropTypeDescription
asideWidthstring
childrenReact.ReactNode
collapsedboolean
densityLayoutDensity
drawerBreakpointnumberViewport width (px) at and below which the drawer is used. Default 980.
headlessboolean
insetbooleanvariant="shell" only: header and sidebar on a tinted canvas, the content on a raised card. Pair with Sidebar variant="inset".
maxWidthLayoutMaxWidth
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.
modeLayoutMode
onLayoutChange() => void
onSidebarOpenChange(open: boolean, detail: { source: string }) => void
sidebarLabelstringAccessible name of the drawer. Default "Navigation".
sidebarOpenbooleanThe drawer is open. With onSidebarOpenChange it is controlled.
sidebarSideLayoutSidebarSide
sidebarWidthstring
variantLayoutVariant

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