@avatune/vue

2,171 131
Install
npm install @avatune/vue
Latest Version:2.2.1
Vue:3
License:MIT
Last Updated:Sep 22, 2026
Links: GitHub  ·  npm
Maintainer: nevmstas

@avatune/vue

npm version npm bundle size

Vue component for rendering avatars from themes.

Installation

npm install @avatune/vue

Usage

<script setup>
import { Avatar } from '@avatune/vue'
import { nevmstasTheme } from '@avatune/nevmstas-theme/vue'
</script>

<template>
  <Avatar
    :theme="nevmstasTheme"
    seed="user@example.com"
    :size="200"
  />
</template>

Props

{
  theme: VueTheme            // Theme to use for rendering (required)
  seed?: string              // Random seed for avatar generation
  size?: number              // Avatar size in pixels (default: theme size)
  class?: string             // CSS class for SVG container
  style?: CSSProperties      // Inline styles for SVG container

  // Part selection (string identifier)
  body?: string
  ears?: string
  eyebrows?: string
  eyes?: string
  hair?: string
  head?: string
  mouth?: string
  nose?: string

  // Part colors (CSS color values)
  bodyColor?: string
  earsColor?: string
  eyebrowsColor?: string
  eyesColor?: string
  hairColor?: string
  headColor?: string
  mouthColor?: string
  noseColor?: string
}

Examples

Random avatar with seed:

<Avatar :theme="nevmstasTheme" seed="521411f1-fab6-4ed5-90bf-2863028bcae6" />

Specific parts with custom colors:

<Avatar
  :theme="nevmstasTheme"
  hair="long"
  hair-color="#ff6b6b"
  eyes="happy"
  eyes-color="#4ecdc4"
/>

Related Packages

Version History

Version Released Vue License
2.2.1 ^3.5.22 MIT
2.2.0 ^3.5.22 MIT
2.1.0 ^3.5.22 MIT
2.0.3 ^3.5.22 MIT
2.0.2 ^3.5.22 MIT