API reference
@salmonui/navigation/sidebar-layout
17 exported symbols: 4 functions, 8 interfaces, 4 types and 1 constant. Each name links its page with the signature, docs and members.
import { … } from '@salmonui/navigation/sidebar-layout';Functions
SidebarLayoutSidebarMainThe content beside the panel; its inline size follows the panel track.SidebarPanelThe panel: <aside> or <nav> with an accessible name (aria-label defaults to localeText.panel), painted by the theme's sidebar surface (data-salmon-surface="sid…SidebarTriggerA button that toggles the panel (or its rail) with aria-expanded and aria-controls.
Interfaces
SidebarBeforeOpenChangeEventArgument of onBeforeOpenChange; preventDefault() keeps the current state.SidebarCollapsedChangeEventSecond argument of onCollapsedChange.SidebarLayoutLocaleTextStatic texts (accessible names). Plain JSON, safe to pass from a server component.SidebarLayoutPropsSidebarMainPropsSidebarOpenChangeEventSecond argument of onOpenChange (frozen in development).SidebarPanelPropsSidebarTriggerProps
Types
SidebarOpenChangeReasonWhy the panel opened or closed: a SidebarTrigger, a press outside, Escape (overlay) or a collapseBelow switch.SidebarPresentationSidebarRenderPropsProps render receives; spread all of them onto the returned element.SidebarSourceInput that caused a change.