New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

adi-userinitials

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adi-userinitials

Create user icons with their initials

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

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.1"></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

Keywords

userinitials

FAQs

Package last updated on 03 Sep 2021

Did you know?

Socket

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.

Install

Related posts