UIAvatar

A user avatar component! Can show user images from Gravatar, or a font awesome icon.

Since: 6.0.0 (3.0.0)

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: 'test.testsson@test.com',
          avatarAlt: 'Alternative text'
      })
    )
}

Last updated