structyl

Input

stable

A styled text input with focus ring and invalid state.

Basic usage

Examples

States

Input with disabled and invalid (aria-invalid) states.

Native input states

Input forwards native props and styles disabled plus invalid states.

Features

  • Hover and focus transitions.
  • aria-invalid styling.
  • Wraps the native input.

Installation

bash
pnpm dlx structyl add input

API Reference

Input

A styled text input. Forwards all native input props.

PropTypeDefault
typestring

Native input type.

'text'
disabledboolean

Disable the input.

false
'aria-invalid'boolean

Marks the field invalid and applies error styling.

classNamestring

Additional Tailwind classes, merged with the component defaults.

Input | structyl