Blossom UI

Avatar

Avatar, avatar group and avatar with information. Sizes, status dot or ring, initials and a placeholder fallback when the image fails.

How to use it

Run npx @blossomui/react add avatar, or copy src/components/UI/Avatar/Avatar.tsx into your React project and import it.

import { Avatar, AvatarGroup, AvatarInfo } from './components/ui/Avatar'

Props

AvatarProps

PropTypeDescription
srcstringImage url. When it is missing or fails to load the initials (or a placeholder) are shown.
altstring
namestringName of the person. It is the accessible name of the avatar and the source of the initials when none are given.
initialsstringShown when there is no image, e.g. "KH". Taken from `name` when it is missing.
sizeAvatarSize
squarebooleanRounded corners instead of a circle.
statusAvatarStatus
statusStyle'dot' | 'ring'`dot` is a small circle in a corner, `ring` outlines the avatar.
statusPosition'top' | 'bottom'

AvatarGroupProps

PropTypeDescription
avatars (required)Pick<AvatarProps, 'src' | 'alt' | 'name' | 'initials'>[]Give each person a `name` to show it in a tooltip when the avatar is hovered or focused.
maxnumberMaximum number of avatars before collapsing the rest into a +N counter.
sizeAvatarSize
onMoreClick() => void

AvatarInfoProps

PropTypeDescription
name (required)string
descriptionReactNode

Getting started

  • Introduction
  • Installation
  • Changelog

Customization

  • Colors
  • Brand color
  • Texts and translation

Components

  • Accordion
  • Alert dialog
  • Alerts
  • Avatar
  • Badges
  • Banner
  • Breadcrumb
  • Buttons
  • Calendar
  • Cards
  • Carousel
  • Charts
  • Chip input
  • Collapsible
  • Color picker
  • Combobox
  • Command palette
  • Context menu
  • Copy button
  • Date picker
  • Drawer
  • Dropdown
  • Empty state
  • File upload
  • Footer
  • Forms
  • Hover card
  • Jumbotron
  • KBD
  • Menubar
  • Modal
  • Navbar
  • Navigation menu
  • Number input
  • OTP input
  • Pagination
  • Popover
  • Pricing
  • Progress
  • Rating
  • Resizable panels
  • Scroll area
  • Segmented control
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Spinners
  • Stats
  • Stepper
  • Survey
  • Table
  • Tabs
  • Time picker
  • Timeline
  • Timer button
  • Toasts
  • Tooltip
  • Transfer list
  • Tree