radio-group
shipbase-ui/radio-groupFreeComponent
shipbase/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/shipbase/ui/next/apps/www/public/r/react/radio-group.jsonSource
1"use client"23import * as React from "react"45import { RadioGroup as RadioGroupPrimitive } from "@ark-ui/react/radio-group"67import { cn } from "@/lib/utils"89const RadioGroup = React.forwardRef<10 React.ElementRef<typeof RadioGroupPrimitive.Root>,11 RadioGroupPrimitive.RootProps12>(({ className, ...props }, ref) => (13 <RadioGroupPrimitive.Root14 ref={ref}15 className={cn("grid gap-3", className)}16 {...props}17 />18))19RadioGroup.displayName = "RadioGroup"2021const RadioGroupContext = RadioGroupPrimitive.Context2223const RadioGroupIndicator = React.forwardRef<24 React.ElementRef<typeof RadioGroupPrimitive.Indicator>,25 RadioGroupPrimitive.IndicatorProps26>(({ className, ...props }, ref) => (27 <RadioGroupPrimitive.Indicator28 ref={ref}29 className={cn(30 "left-(--left) h-(--height) w-(--width) transition-[left,top,width,height,box-shadow]! peer-has-data-[focus-visible]:border-ring peer-has-data-[focus-visible]:ring-[3px] peer-has-data-[focus-visible]:ring-ring/50",31 className32 )}33 {...props}34 />35))36RadioGroupIndicator.displayName = "RadioGroupIndicator"3738const RadioGroupItem = React.forwardRef<39 React.ElementRef<typeof RadioGroupPrimitive.Item>,40 RadioGroupPrimitive.ItemProps41>(({ className, children, ...props }, ref) => (42 <RadioGroupPrimitive.Item43 ref={ref}44 className={cn("peer flex items-center gap-2", className)}45 {...props}46 >47 <RadioGroupPrimitive.ItemHiddenInput />48 {children}49 </RadioGroupPrimitive.Item>50))51RadioGroupItem.displayName = "RadioGroupItem"5253const RadioGroupItemContext = RadioGroupPrimitive.ItemContext5455const RadioGroupItemControl = React.forwardRef<56 React.ElementRef<typeof RadioGroupPrimitive.ItemControl>,57 RadioGroupPrimitive.ItemControlProps58>(({ className, ...props }, ref) => (59 <RadioGroupPrimitive.ItemControl60 ref={ref}61 className={cn(62 "data-[state=checked]:-outline-offset-[5px] aspect-square size-4 shrink-0 rounded-full border border-input bg-transparent shadow-xs transition-shadow focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[disabled]:cursor-not-allowed data-[state=checked]:border-primary data-[state=checked]:bg-primary-foreground data-[disabled]:opacity-50 data-[state=checked]:outline-4 data-[state=checked]:outline-primary data-[state=checked]:outline-solid dark:aria-invalid:ring-destructive/40",63 className64 )}65 {...props}66 />67))68// … truncated
What it pulls in
npm packages
Files it writes
More from shipbase/ui
All 32 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shipbase/ui | Components | Free | 2 deps | |
| avataravatar | shipbase/ui | Components | Free | 1 dep | |
| badgebadge | shipbase/ui | Components | Free | 2 deps | |
| buttonbutton | shipbase/ui | Components | Free | 2 deps | |
| cardcard | shipbase/ui | Components | Free | 1 dep | |
| checkboxcheckbox | shipbase/ui | Components | Free | 2 deps | |
| collapsiblecollapsible | shipbase/ui | Components | Free | 1 dep | |
| comboboxcombobox | shipbase/ui | Components | Free | 2 deps |
