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
typestring—Avatar type (user, contact, business)
sizestring—Avatar size
initialsstring—Custom initials to display
firstNamestring—First name for auto-generated initials
lastNamestring—Last name for auto-generated initials
backgroundColorstring—Custom background color
textColorstring—Custom text color
altstring—Alt text for image
ariaLabelstring—Accessible label