Skip to main content

Defaults & Constants

Events

Three ways to respond to sidebar state changes:

1. Callbacks (Simplest)

2. CSS Custom Properties (Zero-code layout)

Available properties (set on the host page’s <html> element):
  • --sidenet-width — Current width (e.g., 400px) or 0 when closed
  • --sidenet-open1 when open, 0 when closed
  • --sidenet-positionleft or right
Theme token variables (--background, --aui-accent-color, etc.) live inside the Shadow DOM and are not exposed to the host page. To customize them, use updateSidenetStyledConfig({ theme }) rather than CSS overrides.

3. Window Events (Decoupled)

Raw event-name strings ('sidenet:open', 'sidenet:close', 'sidenet:resize', 'sidenet:ready') also work — the constants exist for type safety and refactor resilience. Event detail shape: