Input
A text-entry field for forms, search shells, filters, and validation states.
Dependencies
Copy below cli
npx shadcn add @bjork-ui/primitive-inputHow to use
import { BjorkInput } from "@/components/bjork-ui/primitives";export function Demo() { return ( <BjorkInput aria-label="Project name" placeholder="Name" /> );}
Props
variantdefault | quiet | inset | ghost | errorControls the field surface. Ghost is meant for composed search shells, not standalone forms.
inputSizesm | md | lgUses the same 45px default control height as the home page dock.
aria-invalidbooleanPair with the error variant and helper text for accessible validation states.
typeinput typeDefaults to text and forwards the normal input type prop for email, password, search, and more.
Standalone field
Use for normal form fields. The default shadow matches the home-card controls but stays compact.
<BjorkInput aria-label="Project name" placeholder="Aurora archive"/>Search shell
Wrap the ghost variant when the icon and input need to behave like the bottom search dock.
<label className="flex h-[45px] items-center gap-2 rounded-[13px] bg-[var(--bjork-surface)] px-4 shadow-[var(--bjork-shadow-surface)]"> <Search aria-hidden="true" className="size-4 text-[color:var(--bjork-text-muted)]" /> <BjorkInput variant="ghost" aria-label="Search components" placeholder="Search components" /></label>Inset field
Use for fields nested inside dense cards where the darker interior should read as recessed.
<BjorkInput variant="inset" inputSize="sm" placeholder="Filter"/>Quiet field
Use where the field should keep the form row calm but still show a visible surface.
<BjorkInput variant="quiet" aria-label="Collection" placeholder="Collection"/>Error state
Use with aria-invalid and visible helper text. The orange shadow is intentionally subtle.
<BjorkInput variant="error" aria-invalid="true" aria-describedby="slug-error" defaultValue="weekly/drop"/>Disabled field
Use for locked values when the surrounding layout still needs the field footprint.
<BjorkInput disabled aria-label="Locked slug" value="archive-pulse" readOnly/>