Skip to main content
Mantı UI logoMantı UIv0.12.1
Studio

RadioGroup

Pass options as { value, label, disabled? }. The machine manages arrow keys, roving focus, selection, and form behavior.

import { RadioGroup } from '@manti-ui/react';

const items = [
  { value: 'boiled', label: 'Boiled' },
  { value: 'steamed', label: 'Steamed' },
  { value: 'fried', label: 'Fried', disabled: true },
];

export default function RadioGroupBasic() {
  return (
    <RadioGroup
      label="Cooking method"
      items={items}
      defaultValue="boiled"
      variant="primary"
    />
  );
}

Horizontal layout

Spice level

API

PropTypeDefaultDescription
itemsRadioGroupItem[]The options. Each is `{ value, label, disabled? }`.
labelReactNodeOptional group label.
variantMantiVariant'primary'Active variant when an option is selected.
valuestringControlled selected value.
defaultValuestringInitial selected value for uncontrolled usage.
onValueChange(value: string) => voidCalled whenever the selected value changes.
orientation'horizontal' | 'vertical''vertical'Layout direction.
namestringForm field name.
disabledbooleanDisable the entire group.

Styling

Anatomy

PartSelectorDescription
root[data-scope="radio-group"][data-part="root"]The group wrapper.
label[data-scope="radio-group"][data-part="label"]The optional group label.
item[data-scope="radio-group"][data-part="item"]Each selectable option row.
item-control[data-scope="radio-group"][data-part="item-control"]The radio dot rendered for each item.
item-text[data-scope="radio-group"][data-part="item-text"]Each item label.

Tokens

TokenControls
--manti-radio-group-gapgap
--manti-radio-group-horizontal-gaphorizontal gap
--manti-radio-group-item-gapitem gap
--manti-radio-group-control-sizecontrol size
--manti-radio-group-dot-sizedot size
--manti-radio-group-label-font-sizelabel font size
--manti-radio-group-item-font-sizeitem font size

Last updated

Built end-to-end with Manti UI components and design tokens. Manti UI is a framework-agnostic design system on Zag.js.

GitHub