Skip to content

SidebarProvider ​

Overview ​

Provider component that manages sidebar state and provides context to all child sidebar components.

Theme entry: SidebarProvider

Props ​

NameTypeRequiredDefaultDescription
themeOverrideObjectnullA partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants.
classimport('vue').HTMLAttributes['class']undefinedAdditional CSS classes to apply to the root element.
defaultOpenboolean() => !defaultDocument?.cookie.includes(`${SIDEBAR_COOKIE_NAME}=false`)Whether the sidebar is open by default. Reads from cookie if available.
openbooleanundefinedControlled open state.

Slots ​

default ​

Slot.

Events ​

NameDescription
update:openEmitted when the open state changes.

Full event reference

Source ​

client/lib/navigation/sidebar/SidebarProvider.vue