Skip to content

Browse components

← All components

Fieldset

Fieldset with a legend for grouping related fields.

Install
npx shadcn@latest add https://ui.anuragroy.dev/r/fieldset.json

Preview

Loading preview…

Installation

Add the component from this site. The shadcn CLI fetches the registry JSON over HTTPS — no named registry submission required.

Terminal
npx shadcn@latest add https://ui.anuragroy.dev/r/fieldset.json

GitHub fallback if the website is down:

Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/fieldset.json

Usage

Import paths follow your components.json aliases. After install, the default path is @/components/ui/fieldset.

Import
import {  Fieldset,  FieldsetLegend} from "@/components/ui/fieldset"
example.tsx
import { Fieldset, FieldsetLegend } from "@/components/ui/fieldset"import {  TextField,  TextFieldInput,  TextFieldLabel,} from "@/components/ui/text-field"export function Example() {  return (    <Fieldset className="gap-3">      <FieldsetLegend>Account</FieldsetLegend>      <TextField name="name">        <TextFieldLabel>Name</TextFieldLabel>        <TextFieldInput placeholder="Ada Lovelace" />      </TextField>    </Fieldset>  )}

API Reference

Fieldset

Styled `fieldset`.

PropTypeDefault
classNamestring—

FieldsetLegend

Styled `legend`.

PropTypeDefault
classNamestring—