- Accordion
- Action Bar
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context Menu
- Data List
- Date Picker
- Dialog
- Drawer
- Editable
- Field
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- Marquee
- Menu
- Native Select
- Number Input
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- Table
- Tabs
- Textarea
- Timer
- Toast
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Choose a unique username for your account.
Installation
pnpm dlx shadcn@latest add https://shark.vini.one/r/field.json
Usage
import { Field, FieldLabel, FieldInput, FieldHelper, FieldError } from "@/components/ui/field";
<Field> <FieldLabel>Email</FieldLabel> <FieldInput /> <FieldHelper>Enter your email address</FieldHelper> <FieldError>Email is required</FieldError> </Field>
Examples
Default
Input
Autocomplete
Select an item.
Combobox
Select an item.
Combobox Multiple
Select multiple items.
Textarea
Write a short bio. Maximum 500 characters.
Select
Used for shipping estimates
Checkbox
You'll receive a notification when someone posts a comment
Checkbox Group
Radio Group
Select the plan that fits your needs.
Switch
Slider
Use <SliderLabel /> inside the <Slider /> to label the slider.
Adjust the volume of the media player
Number Input
Field
Choose how you want to receive updates about new features and product releases.
Get notified about important account activity. View activity log
API Reference
Field
Root layout for label, control, and helper/error text. Supports vertical and horizontal orientation.
| Prop | Type | Default |
|---|---|---|
orientation | "vertical" | "horizontal" | "vertical" |
reverse | boolean | false |
invalid | boolean | - |
disabled | boolean | - |
required | boolean | - |
readOnly | boolean | - |
asChild | boolean | - |
className | string | - |
FieldSet
Groups related form controls semantically.
| Prop | Type | Default |
|---|---|---|
className | string | - |
FieldLegend
Legend or label for a FieldSet group.
| Prop | Type | Default |
|---|---|---|
variant | "legend" | "label" | "legend" |
className | string | - |
FieldGroup
Groups multiple fields with consistent spacing.
| Prop | Type | Default |
|---|---|---|
className | string | - |
FieldContent
Wraps label, description, and error. Use with horizontal orientation.
| Prop | Type | Default |
|---|---|---|
className | string | - |
FieldLabel
Label associated with the control via htmlFor / id. Required for accessibility.
| Prop | Type | Default |
|---|---|---|
asChild | boolean | - |
className | string | - |
FieldRequiredIndicator
| Prop | Type | Default |
|---|---|---|
children | ReactNode | "*" |
className | string | - |
asChild | boolean | - |
FieldTitle
Title wrapper for grouped field content.
| Prop | Type | Default |
|---|---|---|
className | string | - |
FieldDescription
Helper text or description. Shown in muted foreground.
| Prop | Type | Default |
|---|---|---|
className | string | - |
FieldSeparator
Horizontal divider between field groups. Optional center label.
| Prop | Type | Default |
|---|---|---|
children | ReactNode | - |
className | string | - |
FieldHelper
Alias for FieldDescription. Use for consistency with other form libraries.
| Prop | Type | Default |
|---|---|---|
className | string | - |
FieldError
Error message shown when the field is invalid. Shown in destructive color.
| Prop | Type | Default |
|---|---|---|
className | string | - |
For a complete list of props, see the Ark UI documentation.
On This Page