VueJS 2 component to display SVG avatar.
Vector graphic is designed by Teneresa - and therefore I ow her a big thank you!
Inspiration came from Avataaars, which is similar project focusing on React.
- SVG
- Configurable
- Extensible
At first you have to install package by yarn or npm like so
yarn add avatio-avatar
Then you can use the component
import Avatar, {Config} from 'avatio-avatar';
const app = new Vue({
components: {Avatar},
template: `<avatar :config="config" :options="options"></avatar>`,
data: {
config: Config['Female'],
options: {
FemaleGlasses: {
color: "#fff",
type: "B",
},
//...
},
}
});
All component is dynamical and is generated by configuration, take a look. By this mechanism is easily extensible and config is used to generate UI of avatar generator.
If you want to build the package, you can run
yarn build