Avatune
Themes

@avatune/retro-cartoon-theme

Avatar theme for Avatune using Retro Cartoon assets.

Source: packages/assets/retro-cartoon-assets/README.md

Avatar theme for Avatune using retro cartoon design assets.

Installation

npm install @avatune/retro-cartoon-theme

Usage

This theme is available for multiple frameworks: React, Vue, Svelte, Angular, and Vanilla JavaScript.

React

import { Avatar } from '@avatune/react'
import theme from '@avatune/retro-cartoon-theme/react'

function App() {
  return (
    <Avatar
      theme={theme}
      size={300}
      seed="optional-seed-for-random-generation"
    />
  )
}

Vue

<script setup lang="ts">
import { Avatar } from '@avatune/vue'
import theme from '@avatune/retro-cartoon-theme/vue'
</script>

<template>
  <Avatar
    :theme="theme"
    :size="300"
    seed="optional-seed-for-random-generation"
  />
</template>

Svelte

<script lang="ts">
  import { Avatar } from '@avatune/svelte'
  import theme from '@avatune/retro-cartoon-theme/svelte'
</script>

<Avatar
  theme={theme}
  size={300}
  seed="optional-seed-for-random-generation"
/>

Angular

import { Component } from '@angular/core'
import { Avatar } from '@avatune/angular'
import theme from '@avatune/retro-cartoon-theme/angular'

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [Avatar],
  template: `
    <avatune-avatar
      [theme]="theme"
      [inputSize]="300"
      seed="optional-seed-for-random-generation"
    />
  `,
})
export class AppComponent {
  theme = theme
}

Vanilla JavaScript

import { avatar } from '@avatune/vanilla'
import theme from '@avatune/retro-cartoon-theme/vanilla'

const container = document.getElementById('avatar-container')
const svg = avatar({
  theme,
  size: 300,
  seed: 'optional-seed-for-random-generation',
})

container?.appendChild(svg)

Customization

You can override specific avatar parts:

<Avatar
  theme={theme}
  size={300}
  hair="curlyBob"          // Choose specific hair style
  hairColor="#FF5733"    // Custom hair color
  body="crewneckSweater"     // Choose specific clothing
  bodyColor="#3498DB"    // Custom clothing color
/>

Design Assets

This theme uses Retro Cartoon style SVG assets for creating customizable avatars. Assets include various options for hair, eyes, eyebrows, mouth, nose, ears, head shape, and body/clothing.

The assets are available in the @avatune/retro-cartoon-assets package.

Using Assets Directly

SVG Paths

import { hair, eyes, mouth } from '@avatune/retro-cartoon-assets';

React Components

import { HairShort, EyesBoring, MouthSmile } from '@avatune/retro-cartoon-assets/react';

Svelte Components

import { HairShort, EyesBoring, MouthSmile } from '@avatune/retro-cartoon-assets/svelte';

Vue Components

import { HairShort, EyesBoring, MouthSmile } from '@avatune/retro-cartoon-assets/vue';

Available Assets

Body

PreviewFilename
blazer
collaredShirt
crewneckSweater
hoodie
turtleneckSweater
vNeckSweater

Eyebrows

PreviewFilename
angled
flat
raised
soft
thick

Eyes

PreviewFilename
happy
neutral
sleepy
surprised
winking

Hair

PreviewFilename
afro
bob
buzzCut
curlyBob
longCurly
longStraight
longWavy
sideSwept
PreviewFilename
standard

Mouth

PreviewFilename
lips
neutral
openedSmile
sad
smirk
teethSmile

Nose

PreviewFilename
curve

License & Credits

Theme License

This theme package is licensed under a modified MIT license that permits any use except repackaging its avatar assets into other avatar libraries such as DiceBear (see LICENSE.md).

Design Assets License

The design assets used in this theme are separately licensed. See the asset package for details.

Development

# Build the theme
bun run build

# Build in watch mode
bun run dev

# Type checking
bun run check-types

On this page