GitHubGitHub
← All components
Forms / component

Radio group

Native radios styled as a group, with optional per-option descriptions.

VerticalHorizontalDisabled option
<RadioGroup label="Aggregation" bind:value options={aggregations} />

Installation

pnpm add @chanrg/4ui

Import the stylesheet once, at the root of your app:

import '@chanrg/4ui/styles.css';

Usage

import { RadioGroup } from '@chanrg/4ui';<RadioGroup label="Aggregation" bind:value options={aggregations} />

API reference

Props

PropTypeDefaultDescription
options{ value, label, description?, disabled? }[][]Choices.
valuestring | null ($bindable)nullSelected value.
orientationvertical | horizontalverticalLayout.

CSS variables

VariableDescription
--4ui-surfacePrimary component surface.
--4ui-textPrimary foreground color.
--4ui-borderDefault control and panel border.

Accessibility

  • role="radiogroup" over native inputs — arrow keys and form semantics are free.

Dependencies

No runtime component dependencies.