Skip to content

@zag-js/menubar@2.0.0-next.1

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 01 Aug 12:04
b7f2221

Minor Changes

  • #3167
    9d7159a Thanks
    @github-actions! - Add the new @zag-js/menubar machine for building
    WAI-ARIA menubars.

    Each top-level item is a standalone menu machine. Pass menubarApi.getMenuContext() to each menu's menubar prop
    so its trigger behaves as a menubar item.

    The menubar coordinates:

    • Roving focus across menu triggers
    • Open/close state and sibling menu switching
    • Nested submenu keyboard behavior
    • Horizontal and vertical orientation
    • Looping focus and disabled state
    import * as menu from "@zag-js/menu"
    import * as menubar from "@zag-js/menubar"
    
    const menubarApi = menubar.connect(menubarService, normalizeProps)
    const menuService = useMachine(menu.machine, { id: "file", menubar: menubarApi.getMenuContext() })

Patch Changes

  • Updated dependencies []:
    • @zag-js/anatomy@2.0.0-next.1
    • @zag-js/core@2.0.0-next.1
    • @zag-js/types@2.0.0-next.1
    • @zag-js/utils@2.0.0-next.1
    • @zag-js/dom-query@2.0.0-next.1