Skip to main content

avataaars

Generates an avatar using the avataaars library by Pablo Stanley.

Signature

avataaars(props: IAvataaars, type: "svg" | "base64"): string

Parameters

NameTypeOptionalDescription
propsIAvataaarsNoSpecifies the avataaars configuration.
operations"svg" | "base64"YesSpecifies the return type of the function. Can be svg to return an SVG image or base64 to return a Base64-encoded string.

Return value

Returns the avataaars SVG as a string.