Form / foldkit-mixins-form

FieldAttrs

interface · packages/mixins-form/src/index.ts:574

interface FieldAttrs {
  readonly type?: string | undefined
  readonly placeholder?: string | undefined
  readonly rows?: number | undefined
  readonly autocomplete?: string | undefined
  readonly inputMode?: string | undefined
  readonly enterKeyHint?: string | undefined
  readonly autocapitalize?: string | undefined
  readonly spellcheck?: boolean | undefined
  readonly min?: string | undefined
  readonly max?: string | undefined
  readonly step?: string | undefined
}

What one key's element takes beyond the base field view: an HTML input type, a placeholder, a textarea's rows, and what a phone's keyboard and the browser's autofill should offer. A renderer reads what fits its element and ignores the rest.

Members

FieldAttrs.type

property · packages/mixins-form/src/index.ts:575

readonly type?: string | undefined

FieldAttrs.placeholder

property · packages/mixins-form/src/index.ts:576

readonly placeholder?: string | undefined

FieldAttrs.rows

property · packages/mixins-form/src/index.ts:577

readonly rows?: number | undefined

FieldAttrs.autocomplete

property · packages/mixins-form/src/index.ts:579

readonly autocomplete?: string | undefined

What the browser may fill in: email, name, street-address, one-time-code, off.

FieldAttrs.inputMode

property · packages/mixins-form/src/index.ts:581

readonly inputMode?: string | undefined

The keypad a phone shows: numeric, decimal, tel, email, url, search, text. A number field is decimal unless this says otherwise.

FieldAttrs.enterKeyHint

property · packages/mixins-form/src/index.ts:583

readonly enterKeyHint?: string | undefined

What a phone keyboard's Enter key says: next, done, go, search, send.

FieldAttrs.autocapitalize

property · packages/mixins-form/src/index.ts:585

readonly autocapitalize?: string | undefined

none, sentences, words, characters. Off by default for an email, tel or url type.

FieldAttrs.spellcheck

property · packages/mixins-form/src/index.ts:587

readonly spellcheck?: boolean | undefined

Off by default for an email, tel or url type, where a correction is a wrong address.

FieldAttrs.min

property · packages/mixins-form/src/index.ts:589

readonly min?: string | undefined

The lowest, highest and stepped value, as the control shows it: read by the renderers of foldkit-mixins-form/declared.

FieldAttrs.max

property · packages/mixins-form/src/index.ts:590

readonly max?: string | undefined

FieldAttrs.step

property · packages/mixins-form/src/index.ts:591

readonly step?: string | undefined