radio-group
skeuomorph-krzysztof/radio-groupFreeComponent
skeuomorph-krzysztof publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by skeuomorph-krzysztof on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://skeuomorph.krzysztof.studio/r/styles/new-york/radio-group.jsonSource
1"use client"23import * as React from "react"4import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"5import { Circle } from "lucide-react"67import { cn } from "@/lib/utils"89const RadioGroup = React.forwardRef<10 React.ElementRef<typeof RadioGroupPrimitive.Root>,11 React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>12>(({ className, ...props }, ref) => {13 return (14 <RadioGroupPrimitive.Root15 className={cn("grid gap-2", className)}16 {...props}17 ref={ref}18 />19 )20})21RadioGroup.displayName = RadioGroupPrimitive.Root.displayName2223const RadioGroupItem = React.forwardRef<24 React.ElementRef<typeof RadioGroupPrimitive.Item>,25 React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>26>(({ className, ...props }, ref) => {27 return (28 <RadioGroupPrimitive.Item29 ref={ref}30 className={cn(31 "aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",32 className33 )}34 {...props}35 >36 <RadioGroupPrimitive.Indicator className="flex items-center justify-center">37 <Circle className="h-3.5 w-3.5 fill-primary" />38 </RadioGroupPrimitive.Indicator>39 </RadioGroupPrimitive.Item>40 )41})42RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName4344export { RadioGroup, RadioGroupItem }
What it pulls in
npm packages
Files it writes
More from skeuomorph-krzysztof
All 54 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | skeuomorph-krzysztof | Components | Free | 1 dep | |
| alertalert | skeuomorph-krzysztof | Components | Free | no deps | |
| alert-dialogalert-dialog | skeuomorph-krzysztof | Components | Free | 1 dep | |
| aspect-ratioaspect-ratio | skeuomorph-krzysztof | Components | Free | 1 dep | |
| avataravatar | skeuomorph-krzysztof | Components | Free | 1 dep | |
| badgebadge | skeuomorph-krzysztof | Components | Free | 1 dep | |
| breadcrumbbreadcrumb | skeuomorph-krzysztof | Components | Free | 1 dep | |
| buttonbutton | skeuomorph-krzysztof | Components | Free | 1 dep |
