Defaults & Constants
| Export | Description |
|---|---|
DEFAULT_THEME | ThemeInput — the full default token set the SDK ships with. Read it to inspect defaults, or spread it into updateSidenetStyledConfig({ theme }) as a starting point. |
SIDENET_EVENTS | { OPEN, CLOSE, RESIZE, READY } — typed event-name constants. Prefer these over raw 'sidenet:open' strings for type safety. |
Events
Three ways to respond to sidebar state changes:1. Callbacks (Simplest)
2. CSS Custom Properties (Zero-code layout)
<html> element):
--sidenet-width— Current width (e.g.,400px) or0when closed--sidenet-open—1when open,0when closed--sidenet-position—leftorright
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)
'sidenet:open', 'sidenet:close', 'sidenet:resize', 'sidenet:ready') also work — the constants exist for type safety and refactor resilience.
Event detail shape:
