An minimalist avatar component for Vue 3.
- Colors decided by initial of username.
- You can customize all colors.
npm install vue-profile-avatar
// or
yarn add vue-profile-avatar
import ProfileAvatar from 'vue-profile-avatar'
export default {
...
components: {
ProfileAvatar
},
...
}
Then:
<ProfileAvatar username="Lorem Ipsum"></ProfileAvatar>
- Type: String
- Description: Username required for getting background and text color.
- Required: true
- Type: String
- Description: Size of the avatar. Can be
s
,m
, orl
. - Default:
s
- Required: false
- Type: String
- Description: Custom size of the avatar. Example:
150px
. - Required: false
- Type: Boolean
- Description: false if you don't want border.
- Default: true
- Required: false
- Type: ColorHex
- Description: Custom background color.
- Required: false
- Type: ColorHex
- Description: Custom border color.
- Required: false
- Type: ColorHex
- Description: Custom text color.
- Required: false
- Type: String
- Description: Type of palette colors for your avatars. Can be
normal
,pastel
, orbrownie
. - Default:
normal
- Required: false
- Type: String
- Description: Url of image.
- Required: false
<profile-avatar username="Thomas Bush" size="s" />
<profile-avatar username="Alexis Wolf" size="m" />
<profile-avatar username="Paul Daniels" size="l" />