dicebear/dicebear

Vuedicebear.com

DiceBear is an avatar library for designers and developers. 🌍

avatarpixel-artavataaarsbotttsavatarsdicebearapiavatar-placeholderfigma
스타 성장
스타
9.5k
포크
413
주간 성장
+69
이슈
0
5k
2017년 5월2020년 6월2023년 7월2026년 9월
README

DiceBear Avatar Library

A grid of DiceBear avatars in twenty-four different styles

npm stars license

DiceBear is an open source avatar library. It turns any seed string (a username or an email address, for example) into an SVG avatar in one of 61 styles, from hand-drawn characters to abstract patterns. The same seed always produces the same avatar, so you store a string instead of an image and never ask users to upload a profile picture.

Avatars are customizable through style options: colors, backgrounds, rotation, individual features like hair or glasses.

Playground | Documentation | Editor

One library, seven languages

DiceBear 10 ships as native libraries for JavaScript, PHP, Python, Rust, Go, Dart, and C#. Every port passes a shared test suite that requires byte-identical SVG output to the JavaScript reference. Generate an avatar in the browser, regenerate it later in a Go or PHP backend, and you get the same bytes.

Language Package Install
JavaScript / TypeScript @dicebear/core npm install @dicebear/core
PHP dicebear/core composer require dicebear/core
Python dicebear-core pip install dicebear-core
Rust dicebear-core cargo add dicebear-core
Go dicebear-go go get github.com/dicebear/dicebear-go/v11
Dart dicebear_core dart pub add dicebear_core
C# DiceBear.Core dotnet add package DiceBear.Core

In JavaScript it looks like this; the documentation has the equivalent for each language:

import { Avatar, Style } from '@dicebear/core';
import definition from '@dicebear/styles/lorelei.json' with { type: 'json' };

const avatar = new Avatar(new Style(definition), {
  seed: 'John',
  size: 128,
});

avatar.toString(); // SVG string
avatar.toDataUri(); // data:image/svg+xml;charset=utf-8,...

The 61 avatar styles are plain JSON definitions from the dicebear/styles repository, available as a package for each language. You can also create your own style, with Figma or from scratch.

Without writing code

  • The HTTP API returns avatars from a plain URL, free and without an account: https://api.dicebear.com/10.x/lorelei/svg?seed=Felix. For full control and privacy you can host it yourself with a single Docker container.
  • The CLI prints an avatar to the terminal or generates files in bulk: npx dicebear create lorelei -o ./avatars --count 10.
  • The editor lets you assemble a single avatar by hand and export it.

This repository

This monorepo contains the seven core libraries, the CLI, the SVG-to-raster converter, the documentation site (dicebear.com), and the editor. Related projects live in their own repositories:

Contributions are welcome; CONTRIBUTING.md explains the setup and where each kind of change belongs.

License

The code is MIT licensed, including commercial use. The avatar styles are the work of their respective creators and carry their own licenses; the license overview lists them all, and many only ask for attribution.

Star this repository

If DiceBear saved you some work, a star makes the project easier to find for the next person looking for an avatar library. The support page lists the other ways to help.

Sponsors

Advertisement: Many thanks to our sponsors who provide us with free or discounted products.

bunny.net
관련 저장소
boringdesigners/boring-avatars

Boring avatars is an open source React library that generates custom, SVG-based avatars from any username and color palette.

TypeScriptnpmMIT Licensereactjavascript
boringavatars.com
6.4k215
Codennnn/vue-color-avatar

An online avatar generator just for fun | 一个纯前端实现的头像生成网站

VueMIT Licensevue3vite
vue-color-avatar.leoku.dev
3.8k483
Mayandev/notion-avatar

🪄 AI-powered online tool for making notion-style avatars.

TypeScriptnpmappMIT Licensenotionavatar
notion-avatar.app
3.2k260
fangpenlin/avataaars-generator

Simple generator React app for avataaars

TypeScriptnpmMIT Licensereactavatar
getavataaars.com
3k386
gfriends/gfriends

媒体服务器演员头像仓库

embyjellyfin
2.9k912
mosch/react-avatar-editor

Small avatar & profile picture component. Resize and crop uploaded images using a intuitive user interface.

TypeScriptnpmMIT Licensereactavatar
react-avatar-editor.launchport.dev
2.5k381
pixiv/three-vrm

Use VRM on Three.js

TypeScriptnpmlibraryMIT Licensegltfthreejs
2.1k189
dai-siki/vue-image-crop-upload

A beautiful vue component for image cropping and uploading. (vue图片剪裁上传组件)

JavaScriptnpmvueimage-crop
dai-siki.github.io/vue-image-crop-upload/example-2/demo.html
2.1k364
laravolt/avatar

Plug n play avatar, turn name, email, and any other string into beautiful avatar (or gravatar), effortless.

PHPPackagistlibraryMIT Licenseavatarphp
2k186
weihaox/awesome-digital-human

Digital Human Resource: 2D/3D/4D Human Modeling, Avatar Generation & Animation, Clothed People Digitalization, Virtual Try-On, etc.

awesomeMIT Licensedigital-humanclothed-people-digitalization
github.com/weihaox/awesome-digital-human
2k173
nusu/avvvatars

Beautifully crafted unique avatar placeholder for your next react project

TypeScriptnpmMIT Licensereactplaceholder-avatars
avvvatars.com
2k86
multiavatar/Multiavatar

Multicultural Avatar Generator in JavaScript

JavaScriptnpmlibraryOtheravatar-generatoravatar-maker
multiavatar.com
2k180