Giter Club home page Giter Club logo

avvvatars's Introduction


npm MIT commitizen PRs styled with prettier linted with eslint ngneat semantic-release

All Contributors

@ngneat/avvvatars

Beautifully crafted unique avatar placeholder for your next angular project. Inspired from avvvatars

demo.mp4

Compatibility with Angular Versions

@ngneat/avvvatars Angular
1.x >= 17

Features

  • ๐ŸŒˆ 40 Colors - Colors are so on point that most of the projects can use it without changing it
  • ๐Ÿ’  60 Shapes - Beautifully crafted shapes that are unique to your user with color combination
  • ๐Ÿ†Ž Text or Shapes ๐Ÿ”ธ - Use letters (eg. JD for John Doe) or unique shapes
  • ๐Ÿค  Unique to user - Generated avatars are unique to the string that you provide, it means if you pass [email protected] you will always get the same avatar
  • โœ๏ธ Customizable - use shadows, change size, provide alternative text to display

Installation

With yarn

yarn add @ngneat/avvvatars

With npm

npm install @ngneat/avvvatars

Getting Started

Import @ngneat/avvvatars to your app, then use it anywhere you want.

import { AvvvatarsComponent } from '@ngneat/avvvatars';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [AvvvatarsComponent],
  template: `
  <avvvatars value="[email protected]"></avvvatars>
  `
})
export class AppComponent {}

Customization

value: string

This is required for plugin to work, each value generates a random avatar to unique to this value, so each time plugin renders, you will get the same results.

<avvvatars value="[email protected]" />

displayValue?: string

Override default text by providing displayValue

for example if you provide value=โ€[email protected]โ€ the character output will be the first 2 letters of value which is โ€œBEโ€, if you pass displayValue=โ€BUโ€ you can override it to BU

<avvvatars value="[email protected]" displayValue="BU" />

style?: character | shape (default character)

Use shape or character as avatar.

<avvvatars value="[email protected]" style="character" />
<avvvatars value="[email protected]" style="avatar" />

character avatar

size?: number (default 32)

Override default size (32px) by providing a number.

<avvvatars value="[email protected]" size={32} />

shadow?: boolean (default false)

Enable shadow around the avatar.

<avvvatars value="[email protected]" shadow={false} />

radius?: number (default size)

Override the radius of the avatar, it takes size by default to always turn it to a circle

<avvvatars value="[email protected]" radius={10} />

border?: boolean (default false)

Toggle border

<avvvatars value="[email protected]" border={false} />

borderSize?: number (default 2)

Override border width

<avvvatars value="[email protected]" borderSize={2} />

borderColor?: string (default #fff)

Override border color

<avvvatars value="[email protected]" borderColor="#fff" />

Contributors โœจ

Thanks goes to these wonderful people (emoji key):

Dharmen Shah
Dharmen Shah

๐Ÿ’ป ๐Ÿ–‹ ๐ŸŽจ ๐Ÿ“– ๐Ÿ’ก ๐Ÿค” ๐Ÿšง ๐Ÿ“ฆ
Netanel Basal
Netanel Basal

๐Ÿ’ผ ๐Ÿง‘โ€๐Ÿซ ๐Ÿ‘€
Add your contributions

This project follows the all-contributors specification. Contributions of any kind welcome!

avvvatars's People

Contributors

semantic-release-bot avatar shhdharmen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ngxpert

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.