
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
@barr-media/avatar-builder
Advanced tools
An avatar builder, built in React that outputs SVG code.
Note: These docs will be expanded out over time. This package is playing a role in one of Barr Media's current projects so getting this built for purpose and live has been the priority and therefore, breaking changes and additions are highly likely.
This package is a React component that you can import into a project. It'll render an avatar builder allowing you to customise an avatar and at the end, output the final SVG.
You can install it via NPM:
npm install @barr-media/avatar-builder
You can simply import the component and use it as any other in your React project.
import { AvatarBuilder } from '@barr-media/avatar-builder';
<AvatarBuilder onFinish={(svg, json) => {
// `svg` = output SVG
// `json` = output JSON
}}/>
This will automatically render the builder.
The builder component requires the prop onFinish as a callback to when you finish and will provide the output SVG and JSON as arguments for you to do what you will with.
Note: This builder contains no CSS rules meaning the output styles will require manual implementation within your project. However, all elements have clear ID's and Classes that use the following convention:
AvatarBuilder__[class or id]. This ensures there's no clashing with existing styles.
As mentioned this package has been rapidly built for a current Barr Media piece of work and kept purposefully "barebone" whilst we're building it into the project.
However, the plan will be to fine tune this package to make it more useful for generalised projects.
To develop, clone this repo to your local machine and in the root of the project run, npm install.
To build for development, simply run npm run build-dev and for production npm run build-prod. This outputs a single JavaScript file in ./dist.
The package is also uploaded to NPM, so to update the package here, bump the version appropriately in package.json and run npm publish.
The SVG assets used in the builder are from Personas by Draftbit – thanks to these guys for providing these open source.
FAQs
An avatar builder, built in React that outputs SVG code.
We found that @barr-media/avatar-builder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.