Skip to content

Core API

import {
createPlanetAvatar,
createPlanetAvatarDataUri,
mountPlanetAvatar
} from 'planet-avatar'

createPlanetAvatar(options) returns a complete SVG string.

createPlanetAvatarDataUri(options) returns a data:image/svg+xml URI for image tags and CSS.

mountPlanetAvatar(target, options) renders the SVG into an existing element.