Home / File/ radio-group.tsx — ui Source File

radio-group.tsx — ui Source File

Architecture documentation for radio-group.tsx, a tsx file in the ui codebase. 4 imports, 0 dependents.

File tsx ComponentRegistry ChartRegistry 4 imports 2 functions

Entity Profile

Dependency Diagram

graph LR
  be324f96_05e9_78f9_19fd_bcbbc6aafbae["radio-group.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  be324f96_05e9_78f9_19fd_bcbbc6aafbae --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  0820cdaa_093d_f246_f310_2f72e7f40dcb["react-radio-group"]
  be324f96_05e9_78f9_19fd_bcbbc6aafbae --> 0820cdaa_093d_f246_f310_2f72e7f40dcb
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  be324f96_05e9_78f9_19fd_bcbbc6aafbae --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"]
  be324f96_05e9_78f9_19fd_bcbbc6aafbae --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81
  style be324f96_05e9_78f9_19fd_bcbbc6aafbae fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"
import { Circle } from "lucide-react"

import { cn } from "@/lib/utils"

const RadioGroup = React.forwardRef<
  React.ElementRef<typeof RadioGroupPrimitive.Root>,
  React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>
>(({ className, ...props }, ref) => {
  return (
    <RadioGroupPrimitive.Root
      className={cn("grid gap-2", className)}
      {...props}
      ref={ref}
    />
  )
})
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName

const RadioGroupItem = React.forwardRef<
  React.ElementRef<typeof RadioGroupPrimitive.Item>,
  React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>
>(({ className, ...props }, ref) => {
  return (
    <RadioGroupPrimitive.Item
      ref={ref}
      className={cn(
        "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",
        className
      )}
      {...props}
    >
      <RadioGroupPrimitive.Indicator className="flex items-center justify-center">
        <Circle className="h-3.5 w-3.5 fill-primary" />
      </RadioGroupPrimitive.Indicator>
    </RadioGroupPrimitive.Item>
  )
})
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName

export { RadioGroup, RadioGroupItem }

Subdomains

Dependencies

  • lucide-react
  • react
  • react-radio-group
  • utils

Frequently Asked Questions

What does radio-group.tsx do?
radio-group.tsx is a source file in the ui codebase, written in tsx. It belongs to the ComponentRegistry domain, ChartRegistry subdomain.
What functions are defined in radio-group.tsx?
radio-group.tsx defines 2 function(s): RadioGroup, RadioGroupItem.
What does radio-group.tsx depend on?
radio-group.tsx imports 4 module(s): lucide-react, react, react-radio-group, utils.
Where is radio-group.tsx in the architecture?
radio-group.tsx is located at deprecated/www/registry/new-york/ui/radio-group.tsx (domain: ComponentRegistry, subdomain: ChartRegistry, directory: deprecated/www/registry/new-york/ui).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free