Your users are gems. Show it.
Deterministic gemstone avatars. Infinitely shimmering.
Create your own gem
Stable avatars for any platform
@m3000/hashed-gems is a React avatar component and hosted image API for generating deterministic gemstone avatars from any string seed. The same seed always resolves to the same avatar, which makes it useful for profiles, comments, communities, dashboards, and developer tools.
Use the interactive WebGL component when you want animated gemstone avatars in React or Next.js, or use the static PNG API when you need a canonical avatar URL for HTML, emails, tables, or social sharing. Each avatar includes stable gem traits such as rarity, gemstone type, and cut, all derived directly from the seed.
Installation
Install with your favourite package manager.
Usage
Import the component and pass any string as a seed.
import "@m3000/hashed-gems/styles.css";
import { HashedGem } from "@m3000/hashed-gems";
<HashedGem seed="alice" />import "@m3000/hashed-gems/styles.css";
import { HashedGem } from "@m3000/hashed-gems";
<HashedGem seed="bob" size={48} />import "@m3000/hashed-gems/styles.css";
import { HashedGem } from "@m3000/hashed-gems";
// Displays at 96px, renders internally at 512px — sharp capture
<HashedGem seed="frank" size={96} resolution={512} />import "@m3000/hashed-gems/styles.css";
import { HashedGem } from "@m3000/hashed-gems";
<HashedGem seed="carol" static />import "@m3000/hashed-gems/styles.css";
import { HashedGem } from "@m3000/hashed-gems";
<HashedGem seed="dave" gemType="emerald" />import "@m3000/hashed-gems/styles.css";
import { HashedGem } from "@m3000/hashed-gems";
<HashedGem seed="eve" cutType="rose" />import "@m3000/hashed-gems/styles.css";
import { HashedGem } from "@m3000/hashed-gems";
<HashedGem seed="hashed-gem" className="rounded-full border border-neutral-500 shadow-lg" />import "@m3000/hashed-gems/styles.css";
import { HashedGem } from "@m3000/hashed-gems";
<HashedGem seed="ada.lovelace" aria-label="Avatar for Ada Lovelace" />
<div>
<HashedGem seed="ada.lovelace" aria-hidden={true} />
<span>Ada Lovelace</span>
</div>Image API
Use the hosted PNG API when you want a static gem image instead of the live WebGL component. Each seed resolves to one canonical `512x512` image.
GET https://gems.m3000.io/api/gems/marina<img
src="https://gems.m3000.io/api/gems/marina"
alt="marina gem"
width="64"
height="64"
/>function UserAvatar({ seed }: { seed: string }) {
return (
<img
src={`https://gems.m3000.io/api/gems/${encodeURIComponent(seed)}`}
alt={`${seed} gem`}
width={64}
height={64}
/>
);
}