Skip to Content

Input

The Input component supports labels, helper text, error states, icons, and three sizes.

Preview

States
Variants

Helpful hint about this field

Import

import { Input } from '@chloe0592/pebble'

Usage

<Input placeholder="Enter text..." /> <Input label="Email" placeholder="you@example.com" /> <Input label="Username" helperText="Must be at least 3 characters" placeholder="Enter username" /> <Input label="Password" errorText="Password is too short" placeholder="Enter password" />

Props

PropTypeDefaultDescription
labelstringLabel displayed above the input
helperTextstringMuted hint text below the input
errorTextstringError message; also sets error styling
leftIconReactNodeIcon rendered on the left inside the input
rightIconReactNodeIcon rendered on the right inside the input
size'sm' | 'md' | 'lg''md'Input height
disabledbooleanfalseDisables interaction

All other props are forwarded to the underlying <input> element.

Last updated on