Robot avatars from any string.
Give botling a user id and it draws the same robot every time, on any machine, with nothing stored. Type anything to meet yours.
Below 40px it switches to a simpler version of the same robot.
Meet a few more
Use it
Install
npm install botling
Draw one
import { botling, botlingDataUri } from 'botling';
// An SVG string, to inline
const svg = botling(user.id);
// A data: URI, for an img src or CSS url()
const src = botlingDataUri(user.id, { size: 40 });
Good to know
- Same seed, same robot. Nothing to store; the robot is computed from the string.
- Seed with an opaque id, like a database id, not an email: anyone can draw the robot for a guessed email and compare.
- No dependencies, no requests. It returns SVG, so it works in the browser, on the server and on the edge, under a strict CSP.
- Picker-ready.
SHAPES,PALETTESandtraits()are exported, so people can choose their own look.