Burger
Open/close navigation button
Import
Source
Docs
Package
Usage
Burger component renders open/close menu button.
Set opened
and onClick
props to control Burger state.
If opened
prop is set cross will be rendered, otherwise – burger:
Color
Burger default colors are theme.black
for light color scheme and theme.white
for dark color scheme.
You can change it to any color value by setting color
prop:
Size
Burger has predefined sizes: xs, sm, md, lg, xl. Alternatively, you can use a number to set width and height in px:
Get button ref
Accessibility
Burger renders a regular button element. Include title
or aria-label
props for screen reader support
as by default element does not associated label.