logo-icon
STW UI

Avatar

Avatars are used to show a thumbnail representation of an individual or business in the interface.

Usage

svelte
import { Avatar } from 'stwui';
// OR
import Avatar from 'stwui/avatar'; // for tree shaking

Sizes

Broken Image Fallback

With Indicator

Shapes

With Initials

ND ND ND ND ND

Avatar Props

src string
alt string avatar
shape 'circle' | 'rounded' | 'square' circle
size 'xs' | 'sm' | 'md' | 'lg' | 'xl' md
initials string
placeholder boolean true

Avatar Slots

placeholder <Avatar.Placeholder slot="placeholder" />
indicator <Avatar.Indicator slot="indicator" />

Avatar.Placeholder Slots

icon

Avatar.Indicator Props

placement 'top-right' | 'bottom-right' | 'top-left' | 'bottom-left' top-right

Avatar Class Identifiers

stwui-avatar
stwui-avatar-container
stwui-avatar-indicator
stwui-avatar-placeholder
stwui-avatar-placeholder-icon