Mixins / foldkit-mixins-ui

BreadcrumbMenu

namespace · packages/mixins-ui/src/breadcrumb/menu.ts:1

export * as BreadcrumbMenu from './breadcrumb/menu.js'

In the guides

Members

BreadcrumbMenu.make

function · packages/mixins-ui/src/breadcrumb/menu.ts:32

function make<Message>({
  max,
  menu,
}: MenuCollapse<Message>): CollapseFeature<Message>

The Menu draws its own button, so the ellipsis slot's look and the accessible name reach it as a Behavior on the Menu's button; the breadcrumb recipe puts the ellipsis's look in the variants layer, over the Menu style's trigger.

interface · packages/mixins-ui/src/breadcrumb/menu.ts:15

interface MenuCollapse<Message> {
  readonly max: number
  readonly menu: {
    readonly model: Menu.Model
    readonly onMessage: (message: Menu.Message) => Message
    readonly mixins: MixinList<Message>
    readonly direction?: 'ltr' | 'rtl' | undefined
  }
}

A folded trail whose ellipsis opens a Menu of the steps it hides, one row each (Breadcrumb.menuRows). The Menu's Model is the application's, made with Menu.init and folded with Menu.update; a row chosen comes out as Menu.OutMessage.Selected, whose step Breadcrumb.chosen finds, for the application to go to. It lives in a module of its own so a trail that never opens a Menu never loads Menu.