badge.tsx — ui Source File
Architecture documentation for badge.tsx, a tsx file in the ui codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 3642a6b8_36f3_4e4f_cb2a_46f0ce0b3608["badge.tsx"] 1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"] 3642a6b8_36f3_4e4f_cb2a_46f0ce0b3608 --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2 25383e8d_ca91_a50e_c3a8_5f228d02e1df["class-variance-authority"] 3642a6b8_36f3_4e4f_cb2a_46f0ce0b3608 --> 25383e8d_ca91_a50e_c3a8_5f228d02e1df 79081a1f_55a3_945a_fb8c_d53d6d3eab81["utils"] 3642a6b8_36f3_4e4f_cb2a_46f0ce0b3608 --> 79081a1f_55a3_945a_fb8c_d53d6d3eab81 style 3642a6b8_36f3_4e4f_cb2a_46f0ce0b3608 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"
const badgeVariants = cva(
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
{
variants: {
variant: {
default:
"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
secondary:
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
destructive:
"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
outline: "text-foreground",
},
},
defaultVariants: {
variant: "default",
},
}
)
export interface BadgeProps
extends React.HTMLAttributes<HTMLDivElement>,
VariantProps<typeof badgeVariants> {}
function Badge({ className, variant, ...props }: BadgeProps) {
return (
<div className={cn(badgeVariants({ variant }), className)} {...props} />
)
}
export { Badge, badgeVariants }
Domain
Subdomains
Functions
Types
Dependencies
- class-variance-authority
- react
- utils
Source
Frequently Asked Questions
What does badge.tsx do?
badge.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 badge.tsx?
badge.tsx defines 1 function(s): Badge.
What does badge.tsx depend on?
badge.tsx imports 3 module(s): class-variance-authority, react, utils.
Where is badge.tsx in the architecture?
badge.tsx is located at deprecated/www/registry/new-york/ui/badge.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