Skip to content

Avatar

Displays user, contact, or business profile pictures with customizable styling and initials fallback.

Open in Storybook

Interactive Demo

Usage

vue
<script setup>
import { Avatar } from '@yellowcard/b2b-design-system';
</script>

<template>
  <Avatar type="user" size="large" firstName="John" lastName="Doe" />
</template>

API Reference

Props

PropTypeDefaultDescription
typestringAvatar type (user, contact, business)
sizestringAvatar size
initialsstringCustom initials to display
firstNamestringFirst name for auto-generated initials
lastNamestringLast name for auto-generated initials
backgroundColorstringCustom background color
textColorstringCustom text color
altstringAlt text for image
ariaLabelstringAccessible label