IdenticonAvatar

<IdenticonAvatar> renders a deterministic, GitHub-style geometric identicon from any seed.

Usage

<script setup>
import { IdenticonAvatar } from '@maxnth/gestalt'
</script>

<template>
  <IdenticonAvatar seed="[email protected]" :size="96" />
</template>

Props

PropTypeDefaultDescription
seedstring | numberAny value; each unique seed yields a unique pattern.
sizenumber32Rendered size in pixels.
radiusnumber | string"9999px"Corner radius. Number is pixels; string is CSS.
mirror"horizontal" | "vertical" | "both" | "none""horizontal"Which axis to mirror.
foregroundstringCell color as #RGB or #RRGGBB; invalid values use the generated color.
backgroundstringSVG background as #RGB or #RRGGBB; invalid values use the generated color.
ringboolean | number | stringfalseOptional outline. true = white 2px ring.
styleobjectExtra inline styles merged onto the wrapper.

Mirror modes

<IdenticonAvatar seed="github" :size="96" mirror="horizontal" ring />

<IdenticonAvatar seed="github" :size="96" mirror="vertical" ring />

<IdenticonAvatar seed="github" :size="96" mirror="both" ring />

<IdenticonAvatar seed="github" :size="96" mirror="none" ring />