Forms
Navigation & layout
Data display & feedback
Date & time
Browse components
← All components
Fieldset
Fieldset with a legend for grouping related fields.
Install
npx shadcn@latest add https://ui.anuragroy.dev/r/fieldset.jsonPreview
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.jsonGitHub fallback if the website is down:
Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/fieldset.jsonUsage
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`.
| Prop | Type | Default |
|---|---|---|
| className | string | — |
FieldsetLegend
Styled `legend`.
| Prop | Type | Default |
|---|---|---|
| className | string | — |