
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
vue-avatar-gradient
Advanced tools
Generate beautiful gradient avatars for your Vue application.
A lightweight Vue 3 component that renders a customizable gradient avatar based on a token string. Ideal for user avatars, placeholders, or generated profile images.
Inspired by Vercel Avatar.
size
and rounded
props.Install the package and its peer dependency:
npm install vue-avatar-gradient tinycolor2
# or
yarn add vue-avatar-gradient tinycolor2
import { Avatar } from 'vue-avatar-gradient'
Provide a username to generate an avatar. Each name will generate a unique avatar. Just replace TOKEN
with an username or email:
<Avatar token="TOKEN"/>
<Avatar token="TOKEN" :round="60"/>
<Avatar token="TOKEN" :size="30"/>
Add the text
parameter:
<Avatar token="TOKEN" text="EU"/>
Prop | Type | Default | Description |
---|---|---|---|
token | String | — | Required. Unique string to generate hash |
size | Number | 50 | Width and height of the SVG avatar (px) |
rounded | Number | 0 | Corner radius for rounded avatars (px) |
text | String | '' | Optional text (e.g., initials) inside avatar |
Build: Uses Vue CLI to produce ESM and UMD bundles:
npm run build
Linting: ESLint configured for .js
and .vue
files:
npm run lint
Contributions, issues, and feature requests are welcome! Feel free to check issues.
MIT
FAQs
Generate beautiful gradient avatars for your Vue application.
The npm package vue-avatar-gradient receives a total of 12 weekly downloads. As such, vue-avatar-gradient popularity was classified as not popular.
We found that vue-avatar-gradient demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.