★ GitHub
Component

Input

Text inputs with labels, hints, errors, prefix/suffix slots, and the signature neo-brutalist focus effect.

Default

We'll never share your email.

Input with label and hint
tsx
<Input label="Email Address" placeholder="you@example.com" hint="We'll never share your email." />

Variants

Default vs Outline
tsx
<Input variant="default" label="Default" placeholder="White background" /> <Input variant="outline" label="Outline" placeholder="Transparent background" />

Sizes

Small, medium, and large
tsx
<Input size="sm" label="Small" placeholder="Small input" /> <Input size="md" label="Medium" placeholder="Medium input" /> <Input size="lg" label="Large" placeholder="Large input" />

Error State

Error styling with message
tsx
<Input label="Password" type="password" placeholder="••••••••" error="Password must be at least 8 characters." />

Disabled

Disabled input
tsx
<Input label="Disabled" placeholder="Cannot type here" disabled />

Prefix & Suffix

https://
🔍
Input with prefix and suffix slots
tsx
<Input label="Website" prefix={<span>https://</span>} placeholder="example.com" /> <Input label="Search" suffix={<span>🔍</span>} placeholder="Type to search..." />

Full Width

Input stretches to fill container
tsx
<Input label="Full Width" placeholder="Takes all space" fullWidth />

Usage

LoginForm.tsx
import { Input, Button } from 'starkit-ui'; function LoginForm() { return ( <form> <Input label="Email" type="email" placeholder="you@example.com" fullWidth /> <Input label="Password" type="password" placeholder="••••••••" error={errors.password} fullWidth /> <Button type="submit" fullWidth size="lg"> Sign In </Button> </form> ); }

Props

PropTypeDefaultDescription
variant'default' | 'outline''default'Visual variant controlling background style.
size'sm' | 'md' | 'lg''md'Size preset controlling height and font size.
labelstring—Label text displayed above the input.
hintstring—Hint text displayed below the input.
errorstring—Error message. Overrides hint and applies error styling.
disabledbooleanfalseDisables the input.
fullWidthbooleanfalseStretches the input to fill its container.
prefixReactNode—Element rendered inside the input, before the text.
suffixReactNode—Element rendered inside the input, after the text.
classNamestring''Additional CSS classes merged onto the container.

All standard <input> HTML attributes are also supported (except size, prefix, suffix which are overridden).