Components
Display user images and badges on Thumbtack.
| Version: | 14.18.2 •View source•Changelog•Report issue | |
|---|---|---|
| Install: | yarn add @thumbtack/thumbprint-react | |
| Import: | import { UserAvatar, EntityAvatar } from '@thumbtack/thumbprint-react'; | |
UserAvataris available in five sizes ranging from xlarge to xsmall.
Avatars without images can display the the user or entity’s initials instead. The initials are assigned to a color based on the first letter in the initials prop.
A badge can be added to denote the online status of a user. The badge will be placed on the top right portion of the avatar and use the 400-level green color as positive indicator of their online status.
This badge indicates that a user or entity is online.
imageUrlHTTPS URL that points a user’s avatar. The imageURL will take
precendence over initials if both are supplied.
stringinitialsThe user’s initials. This should be passed in as a two character string for best results.
stringfullNameThe user’s full name. This is used as title and alt text.
stringsizeThe set of avatar sizes that we support.
This prop can be one of the following 6 types:
'xsmall''small''medium''large''xlarge'numberisCheckedDisplays a badge of a checkmark next to the Avatar.
Note: Indicate this information outside of the avatar instead.
booleanisOnlineDisplays a badge if the user is online.
booleanimageUrlHTTPS URL that points a user’s avatar. The imageURL will take
precendence over initials if both are supplied.
stringinitialThe entity’s initial. This should be passed in as a one character string.
stringfullNameThe entity’s full name. This is used as title and alt text.
stringsizeThe set of avatar sizes that we support.
This prop can be one of the following 6 types:
'xsmall''small''medium''large''xlarge'numberisOnlineDisplays a badge if the user is online.
boolean