Burger
@stellaria/nebula-webBurgerPropsPreview
Props
9| Prop | Type | Default |
|---|---|---|
closeLabel The name it takes while open, swapped in alongside `aria-expanded`. | string | "Close menu" |
color The bars' colour. A role path like the default resolves straight to that token; naming one of the theme's scales instead takes its 600 step. | ColorExtended | "text.primary" |
defaultOpened Where the state starts when nothing controls it. Ignored the moment `opened` is passed. | boolean | false |
disabled Blocks the press, so the state can only be moved from outside. | boolean | false |
onChange Fires with the state the button is moving TO, in both modes — so it is the change hook when uncontrolled and the only way to move when controlled. | ((opened: boolean) => void) | — |
opened The open state, controlled. Passing it takes the state away from the button for good: it stops tracking its own, and `onChange` becomes the only thing that can move it. | boolean | — |
openLabel The button's accessible name while closed — three bare bars have no text of their own. Say what the press does, not what the state is: `aria-expanded` already carries the state. It is English by default (ADR-120); translate it at the call site. | string | "Open menu" |
showBelow The breakpoint below which the button appears; always, by default. | "phone" | "tablet" | "laptop" | "always" | "always" |
size The button's box, and with it how far the bars travel as they cross. The two are tied on purpose: a bar that moves the wrong distance does not land on a clean X. | Size | "md" |
Also accepts
On top of its own props, this component forwards these groups.