Avatar
Used to display an avatar or brand.
Usage
import { Avatar } from 'rsuite';
Examples
Default
Text
You can change the <Avatar>
background color and font color by style
;
With Icon
Image avatar
You can set alt
for <Avatar>
, it make sure avatar show pure text avatar when image load failed.
Size
Badge
Props
<Badge>
Property | Type(Default) |
Description |
---|---|---|
alt | string | This attribute defines the alternative text for the image avatar |
children | string, React.Element |
Content(It maybe text or |
circle | boolean | Render a circle avatar |
classPrefix | string ('avatar') |
The prefix of the component CSS class |
size | enum: 'lg', 'md', 'sm', 'xs' ('md') |
Size of avatar |
src | string | The address of the image for an image avatar |