Skip to main content
On this pageFunctions

Ui/Input

Functions

descriptionId

functionsource
/** Generates the description element ID from the input's base ID. */
(id: string): string

view

functionsource
/** Renders an accessible input by building ARIA attribute groups and delegating layout to the consumer's `toView` callback. */
<ParentMessage>(config: ViewConfig<ParentMessage>): Html

Types

InputAttributes

typesource
/** Attribute groups the input component provides to the consumer's `toView` callback. */
type InputAttributes = Readonly<{
  description: ReadonlyArray<Attribute<ParentMessage>>
  input: ReadonlyArray<Attribute<ParentMessage>>
  label: ReadonlyArray<Attribute<ParentMessage>>
}>

ViewConfig

typesource
/** Configuration for rendering an input with `view`. */
type ViewConfig = Readonly<{
  id: string
  isAutofocus: boolean
  isDisabled: boolean
  isInvalid: boolean
  name: string
  onInput: (value: string) => ParentMessage
  placeholder: string
  toView: (attributes: InputAttributes<ParentMessage>) => Html
  type: string
  value: string
}>

Stay in the update loop.

New releases, patterns, and the occasional deep dive.


Built with Foldkit.

© 2026 Devin Jameson