Search documentation

Search the documentation and open a page.

An image element with a fallback for representing the user.

Loading...

Installation

pnpm dlx shadcn@latest add @wirekyt/avatar

Composition

AvatarGroup (optional) └── Avatar ├── AvatarImage ├── AvatarFallback └── AvatarBadge (optional) AvatarGroupCount (optional)

Examples

Badge

Loading...

Default

Loading...
Loading...

Group Count

Loading...

Group

Loading...

Profile

Loading...

Sizes

Loading...

Variants

Loading...

With Tooltip

Loading...

API Reference

Avatar

PropTypeDefaultDescription
idstring | undefined—Unique identifier used to connect the component parts.
onStatusChange((details: StatusChangeDetails) => void) | undefined—Runs when status changes.
idsElementIds | undefined—Overrides generated identifiers for individual parts.

Context, Hooks, and Types

ExportAPI
AvatarContextRender-prop component that exposes component state and actions.
AvatarRootProviderProvides an externally created API to the component tree.
useAvatarCreates or accesses the component API.
useAvatarContextReturns the nearest component API.