Burger
Mobile navigation toggle that opens a drawer of List items under the header, or fullscreen with large type.
import { Burger } from '@lobehub/ui/base-ui';Navigation
Basic
Loading preview
APIs
Burger properties
activeKeynull | string | number | bigintclassNamestringfooternull | string | number | bigint | false | true | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode>fullscreenbooleanDefaults to
false.headerHeightnumberDefaults to
64.itemsRequiredListItem[]onOpenChangeRequired(opened: boolean) => voidonSelect(key: Key) => voidopenedRequiredbooleansizenumber | 'small' | 'large' | 'middle' | ActionIconSizeConfigstyleCSSPropertiesvariant'filled' | 'outlined' | 'borderless'
items use the base-ui List item shape, so the same builders serve desktop lists and the mobile menu. Selecting an item calls onSelect and closes the drawer. fullscreen covers the header, renders labels in large type without icons and pins footer to the bottom.
Migrating from the root Burger
setOpened→onOpenChange;selectedKeys→activeKey;onClick→onSelect(key).- antd
Menuitems → base-uiListitems; nested submenus are not supported. drawerProps,openKeys,rootClassNameandiconPropsare gone.
Helpful?