Skip to main content
On this pageFunctions

Ui/Select

Functions

descriptionId

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

view

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

Types

SelectAttributes

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

ViewConfig

typesource
/** Configuration for rendering a select with `view`. */
type ViewConfig = Readonly<{
  id: string
  isAutofocus: boolean
  isDisabled: boolean
  isInvalid: boolean
  name: string
  onChange: (value: string) => ParentMessage
  toView: (attributes: SelectAttributes<ParentMessage>) => Html
  value: string
}>

Stay in the update loop.

New releases, patterns, and the occasional deep dive.


Built with Foldkit.

© 2026 Devin Jameson