Avatar Playground for Developers

Generate consistent avatars from any name. One package, three providers, zero config.

npm install mugbear
avatar-0-0
avatar-0-1
avatar-0-2
avatar-0-3
avatar-0-4
avatar-0-5
avatar-0-6
avatar-1-0
avatar-1-1
avatar-1-2
avatar-1-3
avatar-1-4
avatar-1-5
avatar-1-6
avatar-2-0
avatar-2-1
avatar-2-2
avatar-2-3
avatar-2-4
avatar-2-5
avatar-2-6
avatar-3-0
avatar-3-1
avatar-3-2
avatar-3-3
avatar-3-4
avatar-3-5
avatar-3-6
avatar-0-0
avatar-0-1
avatar-0-2
avatar-0-3
avatar-0-4
avatar-0-5
avatar-0-6
avatar-1-0
avatar-1-1
avatar-1-2
avatar-1-3
avatar-1-4
avatar-1-5
avatar-1-6
avatar-2-0
avatar-2-1
avatar-2-2
avatar-2-3
avatar-2-4
avatar-2-5
avatar-2-6
avatar-3-0
avatar-3-1
avatar-3-2
avatar-3-3
avatar-3-4
avatar-3-5
avatar-3-6

Implementation Code

Ready to paste into your project

// Install: npm install mugbear
// Or use the API directly:

interface AvatarProps {
  name: string;
  size?: number;
  style?: 'initials' | 'avataaars' | 'notionists' | 'thumbs';
}

export function Avatar({ name, size = 64, style = 'initials' }: AvatarProps) {
  const url = `https://api.dicebear.com/7.x/${style}/svg?seed=${encodeURIComponent(name)}`;
  
  return (
    <img
      src={url}
      alt={`Avatar for ${name}`}
      width={size}
      height={size}
      style={{ borderRadius: '50%' }}
    />
  );
}

// Usage:
// <Avatar name="John Doe" size={64} style="initials" />

Full API Reference

Everything you need to implement MugBear

  • Core

    getAvatar()

    Pass any name and provider, get a URL back.

    getAvatar('John', { 
      provider: 'dicebear', 
      style: 'initials' 
    })
  • React

    React Component

    Drop-in component with built-in fallback.

    <MugBearAvatar 
      name="John"
      provider="dicebear"
      style="avataaars"
      size={64}
    />
  • Utility

    getAllAvatars()

    Get URLs from all providers at once.

    const avatars = getAllAvatars('John')
    // Returns:
    // { initials, cartoon, robot, 
    //   pixel, notionists, thumbs, 
    //   uiAvatars }
// package

Use as npm Package

npm install mugbear
import { getAvatar } from 'mugbear'

// DiceBear
const url = getAvatar('John Doe', { 
  provider: 'dicebear', 
  style: 'initials' 
})

// RoboHash
const url = getAvatar('John Doe', { 
  provider: 'robohash'
})

// UI Avatars  
const url = getAvatar('John Doe', { 
  provider: 'ui-avatars',
  rounded: true
})
npm versionnpm downloads
TypeScriptZero ConfigMulti-ProviderDeterministicTiny

Works With Your Favorite Tools

Copy the AI Prompt and paste into any AI coding tool

Claude Code
Claude Code
Cursor
Cursor
Windsurf
Windsurf
GitHub
GitHub
Bolt
Bolt
Lovable
Lovable
VS Code
VS Code
Antigravity
Antigravity
Claude Code
Claude Code
Cursor
Cursor
Windsurf
Windsurf
GitHub
GitHub
Bolt
Bolt
Lovable
Lovable
VS Code
VS Code
Antigravity
Antigravity
Claude Code
Claude Code
Cursor
Cursor
Windsurf
Windsurf
GitHub
GitHub
Bolt
Bolt
Lovable
Lovable
VS Code
VS Code
Antigravity
Antigravity
Claude Code
Claude Code
Cursor
Cursor
Windsurf
Windsurf
GitHub
GitHub
Bolt
Bolt
Lovable
Lovable
VS Code
VS Code
Antigravity
Antigravity
Antigravity
Antigravity
VS Code
VS Code
Lovable
Lovable
Bolt
Bolt
GitHub
GitHub
Windsurf
Windsurf
Cursor
Cursor
Claude Code
Claude Code
Antigravity
Antigravity
VS Code
VS Code
Lovable
Lovable
Bolt
Bolt
GitHub
GitHub
Windsurf
Windsurf
Cursor
Cursor
Claude Code
Claude Code
Antigravity
Antigravity
VS Code
VS Code
Lovable
Lovable
Bolt
Bolt
GitHub
GitHub
Windsurf
Windsurf
Cursor
Cursor
Claude Code
Claude Code
Antigravity
Antigravity
VS Code
VS Code
Lovable
Lovable
Bolt
Bolt
GitHub
GitHub
Windsurf
Windsurf
Cursor
Cursor
Claude Code
Claude Code
Ready-to-use prompts for Claude, Cursor, Windsurf, or any AI tool

Three Steps. That's It.

01

Type a name

Enter any name or username

02

Pick a style

Choose from 30+ avatar styles across 4 providers

03

Copy the code

Copy as HTML, React, Vue or as an AI prompt

Powered By

DiceBear

DiceBear

30+ SVG styles. Fully customizable.

Visit
UI Avatars

UI Avatars

Initials-based. Simple and fast.

Visit
RoboHash

RoboHash

Robots and monsters from any text.

Visit