Skip to content

Avatar

Open .md
Live preview

Loading example…

Avatar is part of the Atoms set, imported from @jcsoftdev/ui/atoms.

import { Avatar } from "@jcsoftdev/ui/atoms";

Single-component entry points tree-shake to just this component: @jcsoftdev/ui/atoms/avatar.

<Avatar name="Diego Quispe" size="md" />
Prop Type Default Description
name * string Full name: used for the initials fallback and as the accessible name.
src string
size "md" | "lg" "md"
highlighted boolean Fills the avatar with the accent color (e.g. the current user).
className string

* marks a required prop.

packages/ui/src/atoms/avatar/avatar.tsx