Field
Glass text inputs, with labels, descriptions and errors, fieldsets and forms.
For your receipts.
Installation#
pnpmnpmyarnbun
$ pnpm dlx shadcn@latest add @liquikit/fieldNeeds the @liquikit registry in your components.json. Set it up once.
Usage#
import { Field, Input } from "@/components/liquikit/field"<Field.Root>
<Field.Label>Email</Field.Label>
<Input type="email" placeholder="you@example.com" />
<Field.Description>For your receipts.</Field.Description>
</Field.Root>Examples#
Leading icon#
Form#
Form, Fieldset and Field.Error validate on submit. An invalid field turns red and says why.
API Reference#
Input
| Prop | Type | Default |
|---|---|---|
theme | "light" | "dark"Light or dark glass. Falls back to the nearest | — |
lens | Partial<LensProfile>Overrides for the lens profile, such as | — |
liquid | numberHow far the glass squashes and stretches as it moves. | — |
refraction | "interactive" | "always"When the glass bends the page. | "interactive" |
leading | ReactNodeAn icon or text at the start of the field. | — |
Also takes every prop of Base UI's input, plus className and style.