Text Input Test

Single-line text entry with built-in validation, form association, and accessibility.

Default

Basic text input with a label and placeholder.

All Sizes

Small (32px), medium (40px default), and large (48px) heights.

Focus

Focus state shows accent border and focus ring.

Filled

A filled input looks identical to resting - a value is not a state.

Readonly

Readonly inputs use a secondary background and default cursor.

Disabled

Disabled inputs are dimmed and not interactive.

Invalid

Author-forced invalid state with error text.

With Prefix and Suffix

Prefix and suffix slots for icons or inline content.

Clearable

Clear button appears when the input has a value. Press Escape or click the button to clear.

Counter

Character counter shows n/maxlength when show-counter and maxlength are set.

In Field

Text input used inside a form with validation.

Dark Theme

Text input under the dark theme (toggle via the toolbar).

Programmatic focus

Error summaries can return keyboard focus to the actual text field. The Quangular pipeline uses this API when an opportunity draft is missing its name.

Event Log

Event output for the clearable input above.

Interact with the clearable input to see events...

Native reporting fieldset state

The fieldset supplies the group name and ancestor disabled state. Writing disabled=false to a child cannot bypass its disabled parent; the current value survives disabling and re-enabling.

Reporting snapshot

Reporting fieldset is enabled.