Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Shadcn Field for React and Tailwind

Container for inputs, labels, and helper text.

Choose a unique username for your account.

Installation

bunx --bun shadcn@latest add https://kit.dev/r/field.json

Usage

import {
  Field,
  FieldDescription,
  FieldLabel,
} from "@/components/ui/field";
import { Input } from "@/components/ui/input";
<Field className="w-full max-w-xs">
  <FieldLabel>Username</FieldLabel>
  <Input placeholder="John Doe" />
  <FieldDescription>
    Choose a unique username for your account.
  </FieldDescription>
</Field>

Demos

Autocomplete Field

Checkbox Field

Checkbox Group Field

Combobox Field

Combobox Multiple Field

Disabled Field

Field Group

Input Group

Number Input

Orientation Horizontal

Orientation Vertical

Radio Group Field

Required Field

Select Field

Slider Field

Switch Field

Textarea Field

With Error

API Reference

Field

div

PropType
AttributeType

FieldSet

div

PropType
AttributeType

FieldLegend

PropType
AttributeType

FieldGroup

div

PropType
AttributeType

FieldContent

div

PropType
AttributeType

FieldLabel

label

PropType
AttributeType

FieldRequiredIndicator

span

PropType
AttributeType

FieldTitle

div

PropType
AttributeType

FieldDescription

p

PropType
AttributeType

FieldSeparator

div

PropType
AttributeType

FieldHelper

span

PropType
AttributeType

FieldError

span

PropType
AttributeType

useField

PropType