Avatune
Themes

@avatune/micah-theme

Avatar theme for Avatune using Micah assets.

Source: packages/assets/micah-assets/README.md

Avatar theme for Avatune using micah design assets.

Installation

npm install @avatune/micah-theme

Usage

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

React

import { Avatar } from '@avatune/react'
import theme from '@avatune/micah-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/micah-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/micah-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/micah-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/micah-theme/vanilla'

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

container?.appendChild(svg)

Swift

Add avatune-swift and depend on its AvatuneMicah product:

import AvatuneMicah
import AvatuneRender
import SwiftUI

struct AvatarPreview: View {
    var body: some View {
        AvatarView(
            MicahAvatar(seed: .string("optional-seed-for-random-generation"))
        )
        .frame(width: 300, height: 300)
    }
}

Customization

You can override specific avatar parts:

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

Design Assets

This theme uses Micah 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/micah-assets package.

Using Assets Directly

SVG Paths

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

React Components

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

Svelte Components

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

Vue Components

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

Available Assets

Accessories

PreviewFilename
hoop-ear-ring
stud-ear-ring

Body

PreviewFilename
collared-shirt
crew-shirt
open-shirt

Ears

PreviewFilename
medium
small

Eyebrows

PreviewFilename
down
eyelashes-down
eyelashes-up
up

Eyes

PreviewFilename
eyeshadow
round
smiling
standard

FaceHair

PreviewFilename
beard
scruff

Glasses

PreviewFilename
round
square

Hair

PreviewFilename
danny-phantom
doug-funny
fonze
full
mr-t
pixie
turban
PreviewFilename
standard

Mouth

PreviewFilename
frown
laughing
nervous
pucker
sad
smile
smirk
surprised

Nose

PreviewFilename
curve
pointed
round

License & Credits

Theme License

This theme package is licensed under MIT (see LICENSE.md).

Design Assets License

This project uses avatar design assets licensed under CC BY 4.0.

Original designs by Micah Lanier. Modifications were made to adapt them for composable SVG avatars.

For full details, see CREDITS.md.

Development

# Build the theme
bun run build

# Build in watch mode
bun run dev

# Type checking
bun run check-types

On this page