0

Avatar

renders either an or the of a user.

Usage

example.js
EO
Elsa Oldenburg

Props

animateOnImageLoad

Type: boolean

Fades the image in when it is loaded.

border

Type: boolean

Renders a border around the .

color

Type: CSS['color']

can be rendered with any background color. The background color is only visible if there is no (src).

example.js
EO
name

Type: string

The name to render as .

example.js
EO
shape

Type: "circle","square"

renders with a circle shape by default (30px x 30px). There are handful of preset sizes (below). A custom shape (border-radius) can be provided by passing in a number value.

  • circle: Renders a circular shape.
  • square: Renders a rounded rectangle shape.
size

Type: AvatarSize,CSS['width']

The dimensions of the . renders with a medium size by default (30px x 30px). There are handful of preset sizes (below). A custom sizes can be provided by passing in a number value.

  • xLarge: Renders an that is 48px x 48px
  • large: Renders an that is 36px x 36px
  • medium: Renders an that is 30px x 30px
  • small: Renders an that is 24px x 24px
  • xSmall: Renders an that is 16px x 16px
src

Type: string

The source of the .

See Also