Skip to content

Avatar API

API reference docs for the Stash Avatar component. Learn about the props, CSS, and other APIs of this exported module.

Import

ts
import Avatar from '@leaflink/stash/Avatar.vue';

Props

NameTypeDefaultDescription
altstringundefinedThe alternative text to be displayed in case the image is unavailable
bgColorStashCommonColorundefinedThe background color of the chip. Needs to be one of our design system colors.
colorSchemeStashPrimaryColorGroupiceThe color for the chip that determines both the text and bg color. Needs to be one of the brand colors in our design system (not a shade).
namestring '' The name of the user will be parsed and have its initial displayed in case the src prop is empty
shade"light" | "main"lightThe shade of the provided color to use for the background color. This effects the inferred text color unless a specific text color is provided. Currently only `light` and `main` shades are supported. `dark` may be added in the future.
srcstringundefinedThe image that will be displayed within the avatar
textColorStashCommonColorundefinedThe color of the chip text. Needs to be one of our design system colors.

Slots

None

Events

None