GithubX

Field

A label + control + help text primitive.

Used for sign-in and receipts.

## installation

pnpm dlx shadcn@latest add https://ascii.cnlibs.com/r/field.json

## usage

import { Field, FieldControl, FieldDescription, FieldLabel } from "@/components/ui/field";
import { Input } from "@/components/ui/input";
<Field>
  <FieldLabel htmlFor="email">Email</FieldLabel>
  <FieldControl>
    <Input id="email" type="email" chWidth={36} defaultValue="sam@example.com" />
  </FieldControl>
  <FieldDescription>Used for sign-in and receipts.</FieldDescription>
</Field>

## with error

Password must be at least 8 characters.

## with a select

Where the primary database lives.

## with a textarea

## with a checkbox

Sent to sam@example.com.