Demo

Text Input

Text entry field with support for labels, icons, error states, and keyboard shortcuts. Suitable for naming tracks, clips, presets, and general text entry.

Basic

Simple text input with controlled value.

Value: "Lead Synth"

With Label

Text input with a visible label.

With Icons

Icons can be placed before or after the input.

Sizes

Text inputs come in three sizes.

Full Width

Text input can expand to fill its container.

Error State

Shows validation errors with custom message.

This field is required
Only letters and numbers allowed

States

Text inputs have different visual states.

Submit & Cancel

Handle Enter to submit and Escape to cancel.

Select on Focus

Automatically select all text when focused.

Max Length

Limit the number of characters.

DAW Usage Examples

Common text input use cases in a DAW interface.

Uncontrolled vs Controlled

Supports both controlled and uncontrolled patterns.

Uncontrolled (internal state)
Controlled (parent state)

Accessibility

Text input accessibility features.

Keyboard

  • Enter - Submit value (if onSubmit provided)
  • Escape - Cancel editing (if onCancel provided)
  • Tab - Move focus to next element

ARIA

  • aria-label - Accessible name when no visible label
  • aria-invalid - Set automatically when error is true
  • aria-describedby - Links to error message

Props

  • selectOnFocus - Auto-select text on focus
  • maxLength - Character limit
  • autoFocus - Focus on mount