@avatune/nevmstas-theme
Source:
packages/assets/nevmstas-theme/README.md
Avatar theme for Avatune using nevmstas design assets.
Installation
Section titled “Installation”npm install @avatune/nevmstas-themeyarn add @avatune/nevmstas-themepnpm add @avatune/nevmstas-themebun add @avatune/nevmstas-themeThis theme is available for multiple frameworks: React, Vue, Svelte, and Vanilla JavaScript.
import { Avatar } from '@avatune/react'import theme from '@avatune/nevmstas-theme/react'
function App() { return ( <Avatar theme={theme} size={300} seed="optional-seed-for-random-generation" /> )}<script setup lang="ts">import { Avatar } from '@avatune/vue'import theme from '@avatune/nevmstas-theme/vue'</script>
<template> <Avatar :theme="theme" :size="300" seed="optional-seed-for-random-generation" /></template>Svelte
Section titled “Svelte”<script lang="ts"> import { Avatar } from '@avatune/svelte' import theme from '@avatune/nevmstas-theme/svelte'</script>
<Avatar theme={theme} size={300} seed="optional-seed-for-random-generation"/>Vanilla JavaScript
Section titled “Vanilla JavaScript”import { avatar } from '@avatune/vanilla'import theme from '@avatune/nevmstas-theme/vanilla'
const container = document.getElementById('avatar-container')const svg = avatar({ theme, size: 300, seed: 'optional-seed-for-random-generation',})
container?.appendChild(svg)Customization
Section titled “Customization”You can override specific avatar parts:
<Avatar theme={theme} size={300} hair="bobRounded" // Choose specific hair style hairColor="#FF5733" // Custom hair color body="shirt" // Choose specific clothing bodyColor="#3498DB" // Custom clothing color/>Design Assets
Section titled “Design Assets”This theme uses Nevmstas 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/nevmstas-assets package.
Using Assets Directly
Section titled “Using Assets Directly”SVG Paths
Section titled “SVG Paths”import { hair, eyes, mouth } from '@avatune/nevmstas-assets';React Components
Section titled “React Components”import { HairShort, EyesBoring, MouthSmile } from '@avatune/nevmstas-assets/react';Svelte Components
Section titled “Svelte Components”import { HairShort, EyesBoring, MouthSmile } from '@avatune/nevmstas-assets/svelte';Vue Components
Section titled “Vue Components”import { HairShort, EyesBoring, MouthSmile } from '@avatune/nevmstas-assets/vue';Available Assets
Section titled “Available Assets”| Preview | Filename |
|---|---|
shirt | |
sweater | |
tshirt | |
turtleneck |
| Preview | Filename |
|---|---|
standard |
Eyebrows
Section titled “Eyebrows”| Preview | Filename |
|---|---|
angry | |
small | |
standard |
| Preview | Filename |
|---|---|
boring | |
dots | |
openCircle | |
openRounded |
| Preview | Filename |
|---|---|
bobRounded | |
bobStraight | |
cupCurly | |
long | |
medium | |
short |
| Preview | Filename |
|---|---|
oval |
| Preview | Filename |
|---|---|
bigSmile | |
flat | |
frown | |
halfOpen | |
laugh | |
nervous | |
smile |
| Preview | Filename |
|---|---|
big | |
curve | |
dots | |
halfOval |
License & Credits
Section titled “License & Credits”Theme License
Section titled “Theme License”This theme package is licensed under MIT (see LICENSE.md).
Design Assets License
Section titled “Design Assets License”The design assets used in this theme are separately licensed. See the asset package for details.
Related Packages
Section titled “Related Packages”@avatune/nevmstas-assets- SVG assets used by this theme@avatune/react- React avatar renderer@avatune/vue- Vue avatar renderer@avatune/svelte- Svelte avatar renderer@avatune/vanilla- Vanilla JavaScript avatar renderer
Development
Section titled “Development”# Build the themebun run build
# Build in watch modebun run dev
# Type checkingbun run check-types