Mixins / foldkit-mixins-ui

TagsInputView

interface · packages/mixins-ui/src/tagsInput.ts:300

interface TagsInputView<Message> {
  readonly model: Model
  readonly onMessage: (message: typeof Message.Type) => NoInfer<Message>
  readonly label: string
  readonly placeholder?: string | undefined
  readonly name?: string | undefined
  readonly disabled?: boolean | undefined
  readonly addOnBlur?: boolean | undefined
  readonly direction?: 'ltr' | 'rtl' | undefined
  readonly routes?: ReadonlyArray<Route<NoInfer<Message>>> | undefined
  readonly words?: Partial<TagsInputWords> | undefined
  readonly style?: NamedStyle<typeof TagsInputSlots> | undefined
  readonly mixins?: MixinList<Message> | undefined
}

Members

TagsInputView.model

property · packages/mixins-ui/src/tagsInput.ts:301

readonly model: Model

TagsInputView.onMessage

property · packages/mixins-ui/src/tagsInput.ts:303

readonly onMessage: (message: typeof Message.Type) => NoInfer<Message>

Lifts the field's own Messages into the application's.

TagsInputView.label

property · packages/mixins-ui/src/tagsInput.ts:305

readonly label: string

The input's visible label, which also names the list of tags.

TagsInputView.placeholder

property · packages/mixins-ui/src/tagsInput.ts:306

readonly placeholder?: string | undefined

TagsInputView.name

property · packages/mixins-ui/src/tagsInput.ts:308

readonly name?: string | undefined

Submits each tag under this name, one hidden input apiece, in order; the draft is not submitted.

TagsInputView.disabled

property · packages/mixins-ui/src/tagsInput.ts:309

readonly disabled?: boolean | undefined

TagsInputView.addOnBlur

property · packages/mixins-ui/src/tagsInput.ts:315

readonly addOnBlur?: boolean | undefined

Adds the draft when the input loses focus, as Enter does, so text left in it is not thrown away. A refused draft stays, and says why. Default false: moving to a chip with the arrow keys is a blur too.

TagsInputView.direction

property · packages/mixins-ui/src/tagsInput.ts:317

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

Default ltr; rtl swaps the arrows that move among the chips and out of the input.

TagsInputView.routes

property · packages/mixins-ui/src/tagsInput.ts:322

readonly routes?: ReadonlyArray<Route<NoInfer<Message>>> | undefined

Keys the application answers in the input, beside Enter, the delimiter and Backspace in an empty field: a route on one of those is a diagnostic naming both.

TagsInputView.words

property · packages/mixins-ui/src/tagsInput.ts:324

readonly words?: Partial<TagsInputWords> | undefined

The remove button's and the refusals' words.

TagsInputView.style

property · packages/mixins-ui/src/tagsInput.ts:326

readonly style?: NamedStyle<typeof TagsInputSlots> | undefined

A style of TagsInputSlots, for the field's look.

TagsInputView.mixins

property · packages/mixins-ui/src/tagsInput.ts:328

readonly mixins?: MixinList<Message> | undefined

Mixins beside the style.