Home / Function/ AvatarBadge() — ui Function Reference

AvatarBadge() — ui Function Reference

Architecture documentation for the AvatarBadge() function in avatar.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  02130fdb_aa25_ca40_41f7_c586c2449bcd["AvatarBadge()"]
  a775b950_bc86_9b62_d013_95e438ad8899["avatar.tsx"]
  02130fdb_aa25_ca40_41f7_c586c2449bcd -->|defined in| a775b950_bc86_9b62_d013_95e438ad8899
  style 02130fdb_aa25_ca40_41f7_c586c2449bcd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/radix/ui/avatar.tsx lines 60–74

function AvatarBadge({ className, ...props }: React.ComponentProps<"span">) {
  return (
    <span
      data-slot="avatar-badge"
      className={cn(
        "cn-avatar-badge absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 select-none",
        "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
        "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
        "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
        className
      )}
      {...props}
    />
  )
}

Subdomains

Frequently Asked Questions

What does AvatarBadge() do?
AvatarBadge() is a function in the ui codebase, defined in apps/v4/registry/bases/radix/ui/avatar.tsx.
Where is AvatarBadge() defined?
AvatarBadge() is defined in apps/v4/registry/bases/radix/ui/avatar.tsx at line 60.

Analyze Your Own Codebase

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

Try Supermodel Free