- Accordion
- Action BarUpdated
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- BadgeUpdated
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- CalendarUpdated
- CardUpdated
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context MenuUpdated
- Data List
- Date Picker
- DialogUpdated
- DrawerUpdated
- Editable
- FieldUpdated
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- MarqueeUpdated
- Menu
- Native Select
- Number InputUpdated
- 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
- TableUpdated
- Tabs
- Textarea
- TimerUpdated
- ToastUpdated
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
Choose a unique username for your account.
Installation#
pnpm dlx shadcn@latest add @shark/field
Anatomy#
FieldSet ├── FieldLegend └── FieldGroup ├── Field ├── FieldLabel ├── FieldRequiredIndicator ├── FieldTitle ├── FieldDescription ├── FieldSeparator ├── FieldHelper └── FieldError
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#
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 Group#
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.
| Prop | Type | Default |
|---|---|---|
orientation | "vertical" | "horizontal" | "responsive" | "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.
| 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