Field Examples
38 form fields: a label, a control, a description and an error in one wrapper, across inputs, selects, textareas, toggles and sliders, in vertical, horizontal, responsive and grid layouts. Each on React, Vue, Svelte and Solid, with Base UI, React Aria, Ark UI or Radix UI on React.
Every field example
38 examples.
- Checkbox with DescriptionTogglesA checked box labeled Sync Desktop & Documents folders, with a note that those folders sync with iCloud Drive.

- Choice CardsAdvancedTwo bordered cards under Compute Environment: Kubernetes and Virtual Machine, each with a GPU note. Kubernetes starts selected.

- Complex Multi-Field FormAdvancedPersonal Information: First Name and Last Name share a row, then a full-width Email and a Country menu that says Select country.

- Field Group with SeparatorAdvancedResponses and Tasks, two checkbox sections split by a plain rule. Responses push starts checked and cannot be turned off.

- Fieldset with LegendAdvancedAddress Information, the note We need your address to deliver your order, then Street Address with City beside Postal Code.

- Grid LayoutLayoutsPersonal Details in a grid: First Name beside Last Name, then City across two columns and State in the remaining column.

- Horizontal LayoutLayoutsUsername and Language, each label beside its control. Language opens on English, with Spanish and French in the list.

- Horizontal Layout InputBasic InputsDisplay Name in a fixed-width label beside a text field. The placeholder is John D., and the label and field stay on one row.

- Input with Description AboveBasic InputsA Password label, the rule Must be at least 8 characters long, then a masked field whose placeholder is a row of asterisks.

- Input with Description BelowBasic InputsA Username field with the placeholder johndoe, and the line Choose a unique username for your account under the field.

- Mixed Field Types with SeparatorsAdvancedContact Information with phone and email, a rule labeled Additional Details, and a three-row Additional Information box.

- Mixed OrientationsLayoutsProject Name stacked over My Project with a team note, a Make project public switch, and Archive this project when complete.

Or describe it. With Pro, your AI agent installs the field example you describe, on your framework and UI library.
Get ProGalleries
More component examples
8 related galleries, free: open one for its live examples and their code.
Pricing
Field examples MCP, with Pro
Your AI agent installs any of the 1364 examples, and every component, block and icon, with every Pro plan.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
FAQ
Frequently asked questions
A field is one row of a form: a FieldLabel, the control, and an optional FieldDescription and FieldError, laid out together. FieldGroup stacks fields, FieldSet and FieldLegend group them under a caption, and FieldSeparator divides them. It's shadcn.io's Field component, built on Base UI, React Aria, Ark UI and Radix UI for React, and on Ark UI for Vue, Svelte and Solid, and styled with Tailwind CSS. Each example is one small file.
Yes. Every field example is free to use in personal and commercial projects, with no attribution required. Seeing the code and installing an example takes a free shadcn.io account.
Field is layout and labeling: it holds no value and runs no validation. A form library such as React Hook Form or TanStack Form owns the values and errors; you connect each control to it and set invalid on the Field from its error.
Whenever a control needs a description, an error or consistent spacing with the fields around it, which is most forms. A lone search box or an inline edit can use a Label, or an aria-label, directly.
Set orientation to horizontal on Field. For checkboxes and switches, the control and its label then share a row; use FieldContent to stack a label and a description beside a control.
Set orientation to responsive and put the fields in a FieldGroup. The label stacks over the control in a narrow group and moves beside it once the group is wide; it's a container query, so it follows the form's width, not the screen's.
Wrap the fields in a grid, such as grid grid-cols-2 gap-4, inside the FieldGroup or FieldSet. Each cell is an ordinary Field, and a column span gives one field more room than another.
Set invalid on Field when validation fails and render the message in FieldError. The field turns destructive and its control gets aria-invalid.
Sign in with a free account, then copy the code or run the install command on the example's page. It adds the example, Field and the controls it uses, such as Input, Select or Checkbox, if you don't have them yet.
On Ark UI, Vue, Svelte and Solid, Field connects its FieldLabel to the control inside it with no ids to write. On Base UI, React Aria and Radix UI, set the control's id and point FieldLabel's htmlFor at it, as each example on those libraries does.
When most fields are required, mark the few optional ones with (optional) after the label; otherwise mark required ones with an asterisk and set required on the control, which is what the browser and assistive tech read.
The Field component, the controls each example uses (Input, Textarea, Select, Checkbox, Radio Group, Switch, Slider) and Tailwind CSS. No form library: the examples are layouts you connect to your own state or form library.
Labels are real label elements tied to their controls, groups of choices use fieldset and legend, and invalid fields set aria-invalid. Sliders without a label element get an aria-label.
The static examples render as Server Components. Examples with state, such as the live character count or the sliders, are client components. On Vue, Svelte and Solid they're regular components.
Tailwind CSS v4, the version shadcn.io's components use. The responsive layout relies on v4's container queries.
4.9 out of 5 from 150+ developers
Every field example. One prompt away.
Every field example is free with an account. With Pro, your AI agent installs them from a prompt.
Get Pro


























