vue-profile-avatar

Minimalist avatar component for Vue 3
14,140 12
Install
npm install vue-profile-avatar
Latest Version:1.2.0
Vue:3
License:MIT
Last Updated:Nov 4, 2023
Links: GitHub  ·  npm
Maintainer: pau7rr

vue-profile-avatar

Banner

An minimalist avatar component for Vue 3.

  • Colors decided by initial of username.
  • You can customize all colors.

New Update with Custom Images!

Images

Installation

npm install vue-profile-avatar

// or

yarn add vue-profile-avatar

Usage

ES6


import ProfileAvatar from 'vue-profile-avatar'

export default {
  ...
  components: {
    ProfileAvatar
  },
  ...
}

Then:

<ProfileAvatar username="Lorem Ipsum"></ProfileAvatar>

Configuration

Component props

username
  • Type: String
  • Description: Username required for getting background and text color.
  • Required: true
size
  • Type: String
  • Description: Size of the avatar. Can be s, m, or l.
  • Default: s
  • Required: false
customSize
  • Type: String
  • Description: Custom size of the avatar. Example: 150px.
  • Required: false
border
  • Type: Boolean
  • Description: false if you don't want border.
  • Default: true
  • Required: false
bgColor
  • Type: ColorHex
  • Description: Custom background color.
  • Required: false
borderColor
  • Type: ColorHex
  • Description: Custom border color.
  • Required: false
textColor
  • Type: ColorHex
  • Description: Custom text color.
  • Required: false
colorType
  • Type: String
  • Description: Type of palette colors for your avatars. Can be normal, pastel, or brownie.
  • Default: normal
  • Required: false
image
  • Type: String
  • Description: Url of image.
  • Required: false

Examples

Sizes

    <profile-avatar username="Thomas Bush" size="s" />
    <profile-avatar username="Alexis Wolf" size="m" />
    <profile-avatar username="Paul Daniels" size="l" />

Sizes

Related Packages

@thm-health/vue-profile-image-cropper

Unstyled Vue 3 profile image cropper

1,630 0
vue-animals

A customizable animal avatar Vue component, based on the avatars used by Google...

332 7
vue-avatar

Avatar component for Vue.js

466,478 612
vue-avatar-3

A useful avatar component for Vue 3, with support for letter avatars.

7,661 1
@alexrafael10/vue-avatar

Avatar component for Vue.js

6,112 2

Version History

Version Released Vue License
1.2.0 ^3.0.5 MIT
1.1.0 ^3.0.5 MIT
1.0.2 ^3.0.5 MIT
1.0.1 ^3.0.5 MIT
1.0.0 ^3.0.5 MIT