Forms

Radio group.

One choice from a short, visible list.

LIVE PREVIEWTry it. It works.
Interface density

Install the source

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/radio.json

Registry setup · Open the playground

Usage

React / TypeScript
<RadioGroup label="Density" options={[{value:"comfortable",label:"Comfortable"},{value:"compact",label:"Compact"}]} defaultValue="comfortable" />

In the workspace or ZIP starter, import components from @bld8/ui and include @bld8/ui/styles.css once. Registry installations use your local bld8/ source path. Wrap overlays in UIProvider.

API & behaviour

A native fieldset and legend group the options. options require value and label, with optional disabled. Supports value/onValueChange, defaultValue, name and group disabled.

Notes to self

Test this component with real content, keyboard input and both themes. The example is a starting point; labels, error handling and behaviour still need to fit the application.