Mixins / foldkit-mixins-ui

CommandView

interface · packages/mixins-ui/src/command.ts:54

interface CommandView<Value extends string, Message> {
  readonly id: string
  readonly label: string
  readonly placeholder?: string | undefined
  readonly groups: ReadonlyArray<CommandGroup<Value>>
  readonly query: string
  readonly onQuery: (query: string) => NoInfer<Message>
  readonly active: Option.Option<Value>
  readonly onActive: (value: Value) => NoInfer<Message>
  readonly onRun: (value: Value) => NoInfer<Message>
  readonly empty?: string | undefined
  readonly style?: NamedStyle<typeof CommandSlots> | undefined
  readonly mixins?: MixinList<Message> | undefined
}

Members

CommandView.id

property · packages/mixins-ui/src/command.ts:56

readonly id: string

Prefixes every id the menu draws, unique on the page.

CommandView.label

property · packages/mixins-ui/src/command.ts:58

readonly label: string

The field's accessible name.

CommandView.placeholder

property · packages/mixins-ui/src/command.ts:59

readonly placeholder?: string | undefined

CommandView.groups

property · packages/mixins-ui/src/command.ts:60

readonly groups: ReadonlyArray<CommandGroup<Value>>

CommandView.query

property · packages/mixins-ui/src/command.ts:61

readonly query: string

CommandView.onQuery

property · packages/mixins-ui/src/command.ts:62

readonly onQuery: (query: string) => NoInfer<Message>

CommandView.active

property · packages/mixins-ui/src/command.ts:64

readonly active: Option.Option<Value>

The highlighted row, as the application keeps it.

CommandView.onActive

property · packages/mixins-ui/src/command.ts:65

readonly onActive: (value: Value) => NoInfer<Message>

CommandView.onRun

property · packages/mixins-ui/src/command.ts:67

readonly onRun: (value: Value) => NoInfer<Message>

The Message that runs a row.

CommandView.empty

property · packages/mixins-ui/src/command.ts:69

readonly empty?: string | undefined

What the list says when nothing matches. Default "No results."

CommandView.style

property · packages/mixins-ui/src/command.ts:71

readonly style?: NamedStyle<typeof CommandSlots> | undefined

A style of CommandSlots, for the menu's look.

CommandView.mixins

property · packages/mixins-ui/src/command.ts:73

readonly mixins?: MixinList<Message> | undefined

Mixins beside the style.