Skip to main content
On this pageFunctions

Ui/Textarea

Functions

descriptionId

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

view

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

Types

TextareaAttributes

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

ViewConfig

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

Stay in the update loop.

New releases, patterns, and the occasional deep dive.


Built with Foldkit.

© 2026 Devin Jameson