Component libraryFieldset
Fieldset
ProA native fieldset and legend with linked help, error, requirement copy, and consumer-owned controls.
npx shadcn@latest add @tidal-pro/fieldsetInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/fieldset.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
Extends native fieldset attributes except component-owned children, disabled, and disabled/invalid ARIA mirrors; the forwarded ref targets the fieldset. Required legend and children accept ReactNode content. Optional requirement, description, and error ReactNode values preserve numeric zero; description/error receive linked IDs that compose with external aria-describedby. Error or native aria-invalid=true/string true resolves group invalid presentation. Native disabled and aria-disabled=true resolve the fieldset disabled attribute, so browsers propagate disabled behavior to descendant form controls; explicit aria-disabled=false is preserved. Optional contentProps forwards native div attributes/className around the child controls. Requirement is visible copy only and does not invent native constraint validation; consumers put required on the applicable input/select controls. Native fieldset name/form attributes remain available. Consumers own child values, validation, submission, requests, storage, and accepted focus changes.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.