- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Tooltip
- Typography
import { Button } from "@/components/ui/button";
import { Checkbox } from "@/components/ui/checkbox";
import {
Field,
FieldDescription,
FieldGroup,Installation
$ pnpm dlx shadcn@latest add https://shadcn-cssinjs.com/r/field.json
Usage
import {
Field,
FieldContent,
FieldDescription,
FieldError,
FieldGroup,
FieldLabel,
FieldLegend,
FieldSeparator,
FieldSet,
FieldTitle,
} from "@/components/ui/field/field";<Field>
<FieldLabel htmlFor="email">Email</FieldLabel>
<Input id="email" type="email" />
<FieldDescription>We never share your email.</FieldDescription>
</Field>Composition
FieldSet
├── FieldLegend
├── FieldDescription
└── FieldGroup
└── Field
├── FieldLabel
├── (control)
└── FieldDescriptionExamples
Input
import {
Field,
FieldDescription,
FieldGroup,
FieldLabel,
FieldSet,Textarea
import {
Field,
FieldDescription,
FieldGroup,
FieldLabel,
FieldSet,Select
Select your department or area of work.
import {
Field,
FieldDescription,
FieldLabel,
} from "@/components/ui/field";
import {Slider
Set your budget range ($200 - 800).
"use client";
import { useState } from "react";
import {
Field,Fieldset
import {
Field,
FieldDescription,
FieldGroup,
FieldLabel,
FieldLegend,Checkbox
Your Desktop & Documents folders are being synced with iCloud Drive. You can access them from other devices.
import { Checkbox } from "@/components/ui/checkbox";
import {
Field,
FieldContent,
FieldDescription,
FieldGroup,Radio
import {
Field,
FieldDescription,
FieldLabel,
FieldLegend,
FieldSet,Switch
import { Field, FieldLabel } from "@/components/ui/field";
import { Switch } from "@/components/ui/switch";
export function FieldSwitch() {
return (
<Field className="w-fit" orientation="horizontal">Choice Card
import {
Field,
FieldContent,
FieldDescription,
FieldGroup,
FieldLabel,Field Group
import { Checkbox } from "@/components/ui/checkbox";
import {
Field,
FieldDescription,
FieldGroup,
FieldLabel,Responsive Layout
Use orientation="responsive" to stack the label and control on small screens
and place them side by side on larger screens.
import { Button } from "@/components/ui/button";
import {
Field,
FieldContent,
FieldDescription,
FieldGroup,RTL
To enable right-to-left support, see the RTL guide.
"use client";
import { useTranslation } from "@/components/language-selector";
import type { Translations } from "@/components/language-selector";
import {
Field,API Reference
FieldSet
Container that renders a semantic fieldset with spacing presets.
| Prop | Type | Default |
|---|---|---|
className | string | - |
FieldLegend
Legend element for a FieldSet. Switch to the label variant to align with label sizing.
| Prop | Type | Default |
|---|---|---|
variant | "legend" | "label" | "legend" |
className | string | - |
FieldGroup
Layout wrapper that stacks Field components.
| Prop | Type | Default |
|---|---|---|
className | string | - |
Field
The core wrapper for a single field. Provides orientation control and spacing.
| Prop | Type | Default |
|---|---|---|
orientation | "vertical" | "horizontal" | "responsive" | "vertical" |
className | string | - |
FieldContent
Flex column that groups the control and descriptions when the label sits beside the control.
| Prop | Type | Default |
|---|---|---|
className | string | - |
FieldLabel
Label styled for both direct inputs and nested Field children.
| Prop | Type | Default |
|---|---|---|
className | string | - |
FieldTitle
Renders a title with label styling inside FieldContent.
| Prop | Type | Default |
|---|---|---|
className | string | - |
FieldDescription
Helper text slot that automatically balances long lines in horizontal layouts.
| Prop | Type | Default |
|---|---|---|
className | string | - |
FieldSeparator
A separator between fields, with optional content rendered in the middle.
| Prop | Type | Default |
|---|---|---|
children | React.ReactNode | - |
className | string | - |
FieldError
Displays validation errors. Pass children or an errors array.
| Prop | Type | Default |
|---|---|---|
errors | Array<{ message?: string } | undefined> | - |
children | React.ReactNode | - |