2.0.1 • Published 3 years ago

adi-userinitials v2.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

About the package

This package might be useful to create a user icon with their initials. Light weight and simple to use.

Installation

Using NPM

npm install adi-userinitials --save

Using CDN

<script src="https://unpkg.com/adi-userinitials@2.0"></script>

What's new in v2.0

Added avatar image feature. See the options below

Usage

Using npm

import {userinitial} from 'adi-userinitials'

const res = userinitial({
            name: "Aditya Kadam",
            height: "60px",
            width: "60px",
            root: "#root",
            returnHTML: false
        })

Using CDN

<!-- Paste CDN script tag in your head section of HTML-->

<script>
const res = userinitial({
            name: "Aditya Kadam",
            height: "60px",
            width: "60px",
            root: "#root",
            returnHTML: false
        })
</script>

Output

alt text

Options

OptionsDefault ValueDescription
name (required)''Name/username of the user
root (required)''Parent HTML Element of the icon
backGround'#888888'Background colour of the icon
avatarImage''Image url
fontColor'#ffffff'Font colour of the icon
fontSize'16px'Font size of the initials
fontWeight'600'Font thickness
height'50px'Height of the icon
width'50px'Width of the icon
roundedtrueGives circular icon
returnHTMLfalseReturns icon in the form of HTML element
2.0.1

3 years ago

2.0.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago