Skip to content

RadioGroup ​

Nhóm chọn một.

ts
import { RadioGroup, RadioGroupItem } from "@minap/ui";

Examples ​

Mẫu sống trong Preview; chọn View code khi cần copy.

Usage ​

tsx
import { Label, RadioGroup, RadioGroupItem } from "@minap/ui";

export function Example() {
  return (
    <>
      <RadioGroup defaultValue="a" className="gap-3">
        <Label className="flex min-h-touch items-center gap-2">
          <RadioGroupItem value="a" id="ra" /> Option A
        </Label>
        <Label className="flex min-h-touch items-center gap-2">
          <RadioGroupItem value="b" id="rb" /> Option B
        </Label>
      </RadioGroup>
    </>
  );
}

Props / API ​

Prop / APITypeDefaultNotes
value / defaultValuestring—
onValueChange(value: string) => void—
disabledbooleanfalse
RadioGroupItem.valuestring—Bắt buộc cho mỗi item

Behavior ​

  • size-5 items
  • focus ring

MINAP UI — Soft Periwinkle light, Mobile-First