Avatar
On this page
Avatar
A basic avatar component. Use avatars to visually represent entities in your product, for example people, tokens, currency and companies.
Import component
import { Avatar } from "rimble-ui";
Examples
Different ways to use the Avatar
component
Standard avatar
Standard with image
Custom size
Large
Medium
Small
Props
alt
string
(optional)
Sets alt attribute on image for accessibility
Default value:
'Avatar'
bg
(optional)
Default value:
'grey'
size
string
(optional)
Sets avatar height and width
Default value:
'2rem'
src
string
(required)
Sets avatar image
theme
object
(optional)
Sets theme
Styled System Props
Avatar
uses COMMON
, LAYOUT
, POSITION
, FLEXBOX
, BORDERS
groups of Styled System props.
Design guidelines
Some best practice for using Avatar
in your product.
Use with labels
Do
Labels will help solidify the relationship between the entity and the avatar. This will also make your product more accessible to those using assistive technologies.
DAI
Don't
Failing to label entities like avatars assumes knowledge.