Avatar
An image, initials, or fallback that represents a person or entity.
An image, initials, or fallback that represents a person or entity.
Import
import { Avatar } from 'bmates-ui';Basic usage
The example below mirrors the primary Storybook composition and can be used as a starting point.
<Avatar src="https://i.pravatar.cc/96?img=12" alt="Jane Doe" />Preview
<Avatar src="https://i.pravatar.cc/96?img=12" alt="Jane Doe" />Prop previews
The examples below isolate the props that change visual output or interaction.
Sizes
<Avatar src="/avatar.png" alt="Profile" size="lg" />Component API
src
Required image source.
alt
Required accessible alternative text.
size
Rendered avatar size.
Usage notes
- Every component in the table is exported from
bmates-ui. - Unless noted otherwise, a component also accepts the standard props of its underlying HTML element.
- For application-owned state, use a controlled value and its change handler instead of only a
default*prop.
