radio-group-demo

PreviousNext
Docs
takiexample

Preview

Loading preview…
registry/new-york/examples/radio-group-demo.tsx
import { Radio, RadioGroup } from "@/registry/new-york/ui/radio-group"

export default function RadioGroupDemo() {
  return (
    <div className="mx-auto w-max">
      <RadioGroup defaultValue="comfortable" label="Comfort Level">
        <Radio value="default" id="r1">
          Default
        </Radio>
        <Radio value="comfortable" id="r2">
          Comfortable
        </Radio>
        <Radio value="compact" id="r3">
          Compact
        </Radio>
      </RadioGroup>
    </div>
  )
}

Installation

npx shadcn@latest add @taki/radio-group-demo

Usage

import { RadioGroupDemo } from "@/components/radio-group-demo"
<RadioGroupDemo />