Mixins / foldkit-mixins-ui

ToolbarView

interface · packages/mixins-ui/src/toolbar.ts:94

interface ToolbarView<Message> {
  readonly id: string
  readonly label: string
  readonly items: ReadonlyArray<ToolbarItem<Message>>
  readonly roving: RovingTabindex.Model
  readonly onFocus: (id: string) => NoInfer<Message>
  readonly orientation?: 'horizontal' | 'vertical' | undefined
  readonly direction?: 'ltr' | 'rtl' | undefined
  readonly loop?: boolean | undefined
  readonly disabled?: boolean | undefined
  readonly routes?:
    ReadonlyArray<Behaviors.Keys.Route<undefined, NoInfer<Message>>> | undefined
  readonly style?: NamedStyle<typeof ToolbarSlots> | undefined
  readonly mixins?: MixinList<Message> | undefined
}

Members

ToolbarView.id

property · packages/mixins-ui/src/toolbar.ts:96

readonly id: string

Prefixes the ids the controls draw, which the arrows move focus by; unique on the page.

ToolbarView.label

property · packages/mixins-ui/src/toolbar.ts:98

readonly label: string

What the toolbar is for, read as its accessible name.

ToolbarView.items

property · packages/mixins-ui/src/toolbar.ts:99

readonly items: ReadonlyArray<ToolbarItem<Message>>

ToolbarView.roving

property · packages/mixins-ui/src/toolbar.ts:105

readonly roving: RovingTabindex.Model

Where the one tab stop is: the placed RovingTabindex slice, as the application keeps it. Tab enters at the control it names, the one focused last, or the first enabled control while it names none that can be.

ToolbarView.onFocus

property · packages/mixins-ui/src/toolbar.ts:107

readonly onFocus: (id: string) => NoInfer<Message>

Sent with a control's id when it takes focus, by a key or a press; answer it with RovingTabindex's Focused.

ToolbarView.orientation

property · packages/mixins-ui/src/toolbar.ts:109

readonly orientation?: 'horizontal' | 'vertical' | undefined

Default 'horizontal': Left and Right move, Up and Down are left to the page.

ToolbarView.direction

property · packages/mixins-ui/src/toolbar.ts:111

readonly direction?: 'ltr' | 'rtl' | undefined

Default ltr; rtl swaps ArrowLeft and ArrowRight in a horizontal toolbar.

ToolbarView.loop

property · packages/mixins-ui/src/toolbar.ts:113

readonly loop?: boolean | undefined

Default true: the arrows wrap from the last control to the first.

ToolbarView.disabled

property · packages/mixins-ui/src/toolbar.ts:115

readonly disabled?: boolean | undefined

Every control is off and the toolbar says so (aria-disabled); it has no tab stop and takes no key.

ToolbarView.routes

property · packages/mixins-ui/src/toolbar.ts:121

readonly routes?:
  ReadonlyArray<Behaviors.Keys.Route<undefined, NoInfer<Message>>> | undefined

Keys the application answers beside the arrows, Home and End. They share one keydown owner: a route on the same gesture as another is a diagnostic naming both.

ToolbarView.style

property · packages/mixins-ui/src/toolbar.ts:123

readonly style?: NamedStyle<typeof ToolbarSlots> | undefined

A style of ToolbarSlots, for the toolbar's look.

ToolbarView.mixins

property · packages/mixins-ui/src/toolbar.ts:125

readonly mixins?: MixinList<Message> | undefined

Mixins beside the style.