UIAvatar
A user avatar component! Can show user images from Gravatar, or a font awesome icon.
Properties
Name
Type
Default
Description
avatarId
string
Required - ID of the avatar to display
avatarSource
string
Soruce for avatar. gravatar|url
avatarUrl
string
If avatarSource: url you provied url here
avatarAlt
string
Alt text
wrap
boolean
true
If false no div wrapper and styles will be applied
Example
import {UIAvatar} from 'writer'
render($$) {
const el = $$('div')
return el.append(
$$(UIAvatar, {
avatarSource: 'gravatar',
avatarId: '[email protected]',
avatarAlt: 'Alternative text'
})
)
}
Last updated
Was this helpful?