Fieldset
Related fields under one legend, disabled together when the set is.
01Preview
0102Installation
npx shadcn@latest add https://aiellie.app/r/fieldset.json03API reference
02From the Base UI documentation
Groups a shared legend with related controls. Renders a <fieldset> element.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | ((state: Fieldset.Root.State) => string | undefined) | - | CSS class applied to the element, or a function that returns a class based on the component's state. |
| style | React.CSSProperties | ((state: Fieldset.Root.State) => React.CSSProperties | undefined) | - | Style applied to the element, or a function that returns a style object based on the component's state. |
| render | ReactElement | ((props: HTMLProps, state: Fieldset.Root.State) => ReactElement) | - | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. |