UNPKG

@simplr-sh/avatar

Version:

Simplr Avatar is a simple package that allows you to create an avatar with a name or an image.

28 lines (26 loc) 623 B
/** * Generate an avatar with a gradient background and text * @param name - Name of the user * @param text - Text to display on the avatar * @param size - Size of the avatar * @param rounded - Border radius of the avatar * * @example * getAvatar({ * name: 'John Doe', * text: 'JD', * size: 128, * rounded: 16, * }) * .then(console.log) * .catch(console.error) * * @returns {Promise<string>} Base64 SVG data URI */ declare function getAvatar({ name, text, size, rounded, }: { name: string; text: string; size?: number; rounded?: number; }): Promise<string>; export { getAvatar };