Input

Single-line text field with integrated label and validation messaging.

Add it to your project

Eject the complete input group, then import from its generated local barrel. The copied source and CSS belong to your application.

bash
pnpm exec toucan eject input
app.tsx
import { Input } from '@/components/toucan/input';

Use when

Users enter a short, single-line value.

Avoid when

The value needs multiple lines or a constrained option set.

Example

At least 8 characters

API reference

Generated from packages/react/src/components. Only Toucan-specific props are listed; forwarded native props remain available as noted for each export.

Input

Input

Props type: InputProps

NameTypeDefaultRequiredDescription
descriptionstringundefinedNoSupporting text connected to the control.
errorstringundefinedNoValidation error text or error state.
hideLabelbooleanundefinedNoVisually hide the label while keeping it available to assistive technology.
labelstringundefinedNoVisible or accessible label for the control.
requiredbooleanundefinedNoMarks the control as required.
size"sm" | "md" | "lg"undefinedNoVisual size variant.

Also accepts the native size or input attributes that are not replaced by a Toucan prop.

Type exports

InputProps

Accessibility

  • Labels, descriptions, required state, and errors are connected to the input.

Token families

inputfocus

Related components