The application owns open. Bind it and handle closeRequested by applying false when closing is accepted. opened and closed report lifecycle transitions, not replacement values for open. Project body content and the available header/footer slots. Keep a named trigger in the page so focus can return after dismissal. disableClose only blocks automatic dismissals; provide an explicit completion action.
The application owns open. Bind it and handle closeRequested by applying false when closing is accepted. opened and closed report lifecycle transitions, not replacement values for open. Project body content and the available header/footer slots. Keep a named trigger in the page so focus can return after dismissal. disableClose only blocks automatic dismissals; provide an explicit completion action.
Tab remains in a modal surface. Escape requests dismissal when enabled. Closing returns focus to the original trigger; persistent Sidebar is normal page navigation rather than a modal task.
Key
Action
Tab
In modal mode, move through controls inside the surface. A persistent sidebar follows normal page order.
Shift + Tab
Move backwards through the focus order; modal focus stays inside the surface.
Escape
Request dismissal when enabled; closing restores focus to the trigger.
Inputs, models and Outputs are extracted from the installed Core package. Named public types link to their definitions. Templates below include executable examples.
Inputs
Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.
Name
Type
Default
Template binding
Description
ariaLabel
string
'Navigation menu'
[ariaLabel]
Accessible name of the control or region.
closeLabel
string
'Close navigation menu'
[closeLabel]
Label for close preview. Translate it for your application.
closeOnEscape
boolean
true
[closeOnEscape]
Allow Escape to request closing the sidebar.
collapsed
boolean | undefined
undefined
[collapsed]
Applied collapsed state; undefined lets the component manage the state.
hideHeader
boolean
false
[hideHeader]
Hide the sidebar header region.
initialCollapsed
boolean
false
[initialCollapsed]
One-time collapse seed when collapsed is omitted.
open
boolean
false
[open]
Application-owned visibility. Apply false when the requested dismissal is accepted.
persistent
boolean
false
[persistent]
Render side content as part of page layout rather than a modal overlay.
restoreFocus
boolean
true
[restoreFocus]
Restore focus to the original trigger after closing.
side
"left" | "right"
'left'
[side]
Choose the physical left or right side of the sidebar.
Outputs
Listen to an event with (event)="handler($event)". The table explains the data your handler receives and how to use it.
Name
Payload
Template binding
Description
closed
void
(closed)="onClosed($event)"
Reports closure of this component. Consult the payload type for the emitted data.
Requests dismissal with its reason and original event. The application accepts by applying open=false.
collapsedChange
boolean
(collapsedChange)="onCollapsedChange($event)"
Proposes the next collapsed state; update collapsed when controlled.
opened
void
(opened)="onOpened($event)"
Reports opening of this component. Consult the payload type for the emitted data.
Templates
ng-content projects content into the component. TemplateRef inputs receive a template; ng-template directives identify templates with a typed context. A directive shared by an entrypoint is not necessarily a slot of this component.
Use the supported public tokens listed below. Surrounding layout belongs to your application; validate the result in light and dark modes and narrow containers.
Specific tokens
Token
Purpose
State / variant
Default / source
Fallback
--neu-sidebar-bg
Inherited theme value used by this component
Field surface
var(--neu-surface)Root declaration
--neu-surface
--neu-sidebar-collapsed-width
Inherited theme value used by this component
Field surface
60pxRoot declaration
No token alias
--neu-sidebar-width
Inherited theme value used by this component
Field surface
260pxRoot declaration
No token alias
Shared tokens used
Override these on a local wrapper to affect this example. An override on :root affects other components that use the same token.
Token
Purpose here
Other impact
Default / fallback
--neu-border
Normal control and cell borders
Shared by other Core consumers; scope the override.
rgba(15, 23, 42, 0.08)
--neu-focus-ring-strong
Emphasized focus treatment
Shared by other Core consumers; scope the override.