Avatar() — ui Function Reference
Architecture documentation for the Avatar() function in avatar.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD fa59caf5_c587_e897_0f69_e374394c0cc2["Avatar()"] a775b950_bc86_9b62_d013_95e438ad8899["avatar.tsx"] fa59caf5_c587_e897_0f69_e374394c0cc2 -->|defined in| a775b950_bc86_9b62_d013_95e438ad8899 style fa59caf5_c587_e897_0f69_e374394c0cc2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/registry/bases/radix/ui/avatar.tsx lines 8–26
function Avatar({
className,
size = "default",
...props
}: React.ComponentProps<typeof AvatarPrimitive.Root> & {
size?: "default" | "sm" | "lg"
}) {
return (
<AvatarPrimitive.Root
data-slot="avatar"
data-size={size}
className={cn(
"cn-avatar after:border-border group/avatar relative flex shrink-0 select-none after:absolute after:inset-0 after:border after:mix-blend-darken dark:after:mix-blend-lighten",
className
)}
{...props}
/>
)
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Avatar() do?
Avatar() is a function in the ui codebase, defined in apps/v4/registry/bases/radix/ui/avatar.tsx.
Where is Avatar() defined?
Avatar() is defined in apps/v4/registry/bases/radix/ui/avatar.tsx at line 8.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free