Skip to Content
ComponentsInput

Input

A text input field with multiple sizes and validation states.

Import

import { Input } from '@grannyshot/ui'

Usage

<Input placeholder="Enter your name" />

Sizes

<Input size="sm" placeholder="Small" /> <Input size="md" placeholder="Medium" /> <Input size="lg" placeholder="Large" />

States

<Input state="error" placeholder="Error state" /> <Input state="success" placeholder="Success state" />

Disabled

<Input disabled placeholder="Disabled input" />

Props

PropTypeDefaultDescription
size'sm' | 'md' | 'lg''md'Input size
state'default' | 'error' | 'success''default'Validation state
placeholderstringPlaceholder text
disabledbooleanfalseDisabled state
classNamestringAdditional CSS classes

Extends all native <input> HTML attributes.

Last updated on