Skip to content
Alea0.1

Navigation

Burger

The three-line menu button that turns into a close icon.

Ant Design: -

import { Burger } from '@alea/ui';

Examples

Burger

Turns into a close icon and reports aria-expanded.

Props

Burger props

The three-line menu button that morphs into a close icon (Mantine Burger).

PropTypeDefaultDescription
isOpenrequiredboolean-Whether the menu it controls is open.
onChangerequired(open: boolean) => void-Called with the new open state.
aria-controlsstring-The id of the menu it opens.
aria-labelstring-Name. Default "Menu".
classNamestring-Extra class names for the root element.
size"sm" | "md"'md'sm (32 px) or md (40 px, default).

Accessibility

  • A button with aria-expanded and aria-controls pointing at the menu.

Keyboard

KeyDoes
Enter or SpaceOpens or closes the menu

Do and don't

Do

  • Point aria-controls at the menu it opens.
  • Show the full navigation on wide screens instead.

Don't

  • Don't hide important navigation behind it on desktop.
  • Don't use it for anything but showing navigation.
Tested with axe, keyboard and screen reader roles