Mixins / foldkit-mixins-ui

InputField

interface · packages/mixins-ui/src/input.ts:91

interface InputField<Message> {
  readonly id: string
  readonly label: string
  readonly field: FieldValidation.Field<unknown>
  readonly changed: (value: string) => Message
  readonly type?: string | undefined
  readonly placeholder?: string | undefined
  readonly style?: NamedStyle<typeof InputSlots> | undefined
  readonly mixins?: MixinList<Message> | undefined
  readonly draw?:
    ((parts: FieldParts, h: HtmlBuilder<Message>) => Html) | undefined
}

A text field in one call: a field's state drawn through view with its label, control, and description placed. The value is drawn with String(), as the base field view draws any draft. draw places the parts; the default stacks them. type and placeholder ride through only where given. Custom drawers stay for controls with no shipped renderer.

Members

InputField.id

property · packages/mixins-ui/src/input.ts:92

readonly id: string

InputField.label

property · packages/mixins-ui/src/input.ts:93

readonly label: string

InputField.field

property · packages/mixins-ui/src/input.ts:94

readonly field: FieldValidation.Field<unknown>

InputField.changed

property · packages/mixins-ui/src/input.ts:95

readonly changed: (value: string) => Message

InputField.type

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

readonly type?: string | undefined

InputField.placeholder

property · packages/mixins-ui/src/input.ts:97

readonly placeholder?: string | undefined

InputField.style

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

readonly style?: NamedStyle<typeof InputSlots> | undefined

A style of InputSlots, for the field's own look.

InputField.mixins

property · packages/mixins-ui/src/input.ts:101

readonly mixins?: MixinList<Message> | undefined

Mixins beside the style, for state or behavior the style does not own.

InputField.draw

property · packages/mixins-ui/src/input.ts:102

readonly draw?:
  ((parts: FieldParts, h: HtmlBuilder<Message>) => Html) | undefined