xl vision
  • Component
  • React Hooks
  • Playground
  • Overview
  • Color
  • Getting Start
    • Installation
  • General
    • Icon
    • Button
  • Layout
    • Grid
  • Form
    • Input
    • InputNumber
    • Textarea
  • Navigation
    • Dropdown
    • Affix
    • BackTop
    • Anchor
  • Data Display
    • Tooltip
    • Popover
    • Avatar
  • Faceback
    • Popconfirm
    • Dialog
    • Message
    • Notication
  • Animation
    • Transition
    • TransitionGroup
    • CollapseTransition
    • Ripple
  • Styles
    • Theme
    • CssBaseline
  • Basic Component
    • BaseButton
    • Portal
    • Popper
    • Modal
    • ResizeObserver

Avatar

It is used to represent users or things, and supports the display of pictures, icons or characters.

Examples

Baisc stage

Baisc Stage

User
Support content

Support imgae, icon and string content 支持图片、Icon 以及字符三种类型

Tom
Auto size

Auto adjust content size

K
K+2
K+2
Group

Show in a group

Properties

Avatar

PropertyDescriptionTypeDefaultRequire
childrencontent, have to be string typestring-false
iconiconReact.ReactNode-false
shapeshapecircle | square | roundcirclefalse
sizesize, could also customizesmall | middle | large | numbermiddlefalse
srcsource for image or image component instancestring | React.ReactNode-false
srcSetsrcSet for imagestring-false
onErrorinvoke when image loads failed, default hide image when image loads failed, but if return false, image will always showfunction-false
altalt for imagestring-false
gapgap between border and contentnumber4false

AvatarGroup

PropertyDescriptionTypeDefaultRequire
childrenavatar arrayReactElement[]-true
popupPlacementpopup box placement, hide when set 'none'none | top | bottomtopfalse
shapeshape, act on sub-componentscircle | square | roundcirclefalse
sizesize, act on sub-componentssmall | middle | large | numbermiddlefalse
maxCountmax avatar number on displaynumber-false
maxStyleextra avatar styleReact.CssProperties-false
Examples
Baisc stage
Support content
Auto size
Group
Properties
Avatar
AvatarGroup
Copyright © 2020-2021 Rhys Xia