Skip to main content
On this pageFunctions

Ui/Button

Functions

view

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

Types

ButtonAttributes

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

ViewConfig

typesource
/** Configuration for rendering a button with `view`. */
type ViewConfig = Readonly<{
  isAutofocus: boolean
  isDisabled: boolean
  onClick: ParentMessage
  toView: (attributes: ButtonAttributes<ParentMessage>) => Html
  type: "button" | "submit" | "reset"
}>

Stay in the update loop.

New releases, patterns, and the occasional deep dive.


Built with Foldkit.

© 2026 Devin Jameson