Search components

Find a component by name

Field

Accessible form field layout: FieldSet, FieldLegend, FieldGroup, Field, FieldLabel, FieldDescription, FieldError.

Field wraps one control with its FieldLabel, FieldDescription and FieldError. FieldGroup stacks fields, and FieldSet with FieldLegend groups related ones semantically. For forms wired to React Hook Form, see the Form page.

Payment Method

All transactions are secure and encrypted

Enter your 16-digit card number

Billing Address

The billing address associated with your payment method

Input

Put FieldDescription before or after the Input; its spacing adjusts either way. Point FieldLabel's htmlFor at the input's id.

Choose a unique username for your account.

Must be at least 8 characters long.

Textarea

A Textarea takes the same label and helper text as an input.

Share your thoughts about our service.

Select

Give the SelectTrigger the id that FieldLabel points at. Inside a vertical Field, the trigger stretches to full width.

Select your department or area of work.

Slider

Use FieldTitle when there is no single element to label, and give the Slider an aria-label. The description can show the live value.

Price Range

Set your budget range ($200 - 800).

Fieldset

FieldSet renders a semantic fieldset, and FieldLegend names the whole group for assistive tech. Put fields in a grid inside FieldGroup to place them side by side.

Address Information

We need your address to deliver your order.

Checkbox

Use orientation="horizontal" to put a Checkbox beside its label, and FieldLegend variant="label" for a legend at label size. Wrap the label and description in FieldContent so they stay aligned next to the control.

Show these items on the desktop

Select the items you want to show on the desktop.

Your Desktop & Documents folders are being synced with iCloud Drive. You can access them from other devices.

Radio

Give each RadioGroupItem its own horizontal Field inside the RadioGroup, with the group titled by FieldLegend.

Subscription Plan

Yearly and lifetime plans offer significant savings.

Switch

A horizontal Field with the label first puts the Switch at the end of the row.

Choice Card

Wrap a Field in FieldLabel to make the whole card selectable. This works with RadioGroupItem, Checkbox and Switch. The boxed choice cards the apps already use are RadioGroupItemBoxed and CheckboxBoxed.

Compute Environment

Select the compute environment for your cluster.

Field Group

FieldGroup stacks Fields and FieldSeparator divides them. Add data-slot="checkbox-group" to a group of checkboxes for tighter spacing.

Get notified when responses to requests that take time, like research or image generation, are ready.

Get notified when tasks you've created have updates. Manage tasks

Responsive Layout

orientation="responsive" stacks label and control in narrow containers and puts them side by side once the parent FieldGroup (a @container/field-group) is wide enough. Use orientation="horizontal" to keep them side by side always.

Profile

Fill in your profile information.

Provide your full name for identification

Installation

npx shadcn@latest add @refer/field

Variations

Ported from shadcn's examples. Open Code on any section to see and copy it.

Input Fields

Choose a unique username for your account.

We'll never share your email with anyone.

This field must be filled out.

This field is currently disabled.

This field contains validation errors.

This field is currently disabled.

Textarea Fields

Maximum 500 characters allowed.

Tell us about yourself in a few sentences.

Enter your message so it is long enough to test the layout.

This field contains validation errors.

This field is currently disabled.

Select Fields

Select the country where you currently reside.

Choose your local timezone for accurate scheduling.

This field contains validation errors.

This field is currently disabled.

Checkbox Fields

Receive weekly updates about new features and promotions.

Preferences

Select all that apply to customize your experience.

Radio Fields
Subscription Plan
Battery Level

Choose your preferred battery level.

Enable Touch ID to quickly unlock your device.

Invalid Radio Group
Disabled Radio Group
Switch Fields

Turn on airplane mode to disable all connections.

Receive emails about new products, features, and more.

Manage your privacy preferences.

This switch has validation errors.

This switch is currently disabled.

Slider Fields

Current brightness: 75%

Higher quality uses more bandwidth.

Range: 0.3 - 0.7

$25 - $75

Red: 10%, Green: 20%, Blue: 70%

This slider has validation errors.

This slider is currently disabled.

Native Select Fields

Select the country where you currently reside.

Choose your local timezone for accurate scheduling.

Native select with grouped options using optgroup.

This field contains validation errors.

This field is currently disabled.

OTP Input Fields

Enter the 6-digit code sent to your email.

Enter the code from your authenticator app.

Enter your 4-digit PIN (numbers only).

This OTP field contains validation errors.

This OTP field is currently disabled.

Horizontal Fields

Enter your preferred username.

Write a short description about yourself.

Receive email updates about your account.

Choose your favorite fruit.

Select your country.

Adjust the volume level.

Usage in the apps

Which apps install this component, whether their copy matches the registry, and which files import it.

PortalNot installedNot imported
ArgusNot installedNot imported
LandingNot installedNot imported
PartnersNot installedNot imported

No app imports this component. From olympus-backend@2ee40d05e, Oct 26, 2026. โ€œIn syncโ€ means the app's copy matches this registry; refresh with npm run usage:build.