npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

neontext

v2.0.2

Published

![neonified text](maintext.png) # NeonText > Give your text a touch of neon.

Downloads

12

Readme

neonified text

NeonText

Give your text a touch of neon.

A colorful neon text generator, that splits the innerText of your element into seperate spans and colorizes their text-shadow and color properties individualy.

Features

  • :rocket: zero dependencies, tiny library
  • :boom: available in multiple formats umd, esm and cjs
  • :zap: written in typescript

Installation

via npm

npm install neontext

Afterwards import the library.

import { neonify } from 'neontext'

via <script>

Add the following line to your HTML file and adjust the path.

<script src="path/to/neontext.umd.js"></script>
<script>
    neontext.neonify({options})
</script>

Usage

Given the following HTML markup.

<div id="container">
    Servus,<br>Howdy folks!
</div>

Simply call the neonify() function and pass your options within an object.

neonify({ 
    elem: "container", // mandatory
    shadowBlurRadius: 5,
    colors: ["red", "green", "purple"],
    random: true,
    colorizeText: false,
    shadowOffsetX: 0,
    shadowOffsetY: 0,
})

The colors will be randomly applied, which will result in:
rainbowified text

Configuration

The options have to be passed in an object adhering to the following interface:

interface options {
    elem: string,
    colors?: Array<string>,
    shadowBlurRadius?: number,
    random?: boolean,
    colorizeText?: boolean,
    shadowOffsetX?: number,
    shadowOffsetY?: number,
}

elem

Type: String
Default: none
Mandatory: true

The id of the element containing your text.


colors

Type: Array<String>
Default: ["#ff00ff", "#00ffff", "#ffff00"]
Mandatory: false

An array containing the CSS color strings, which will be used for coloring the text-shadow.


shadowBlurRadius

Type: Number
Default: 5
Mandatory: false

The blur radius for the text-shadow.


colorizeText

Type: boolean
Default: false
Mandatory: false

Sets wether the text color will be colorized aswell.


random

Type: boolean
Default: false
Mandatory: false

Should the colors get randomly applied to spans.


shadowOffsetX

Type: number
Default: 0
Mandatory: false

The text-shadow x offset.


shadowOffsetY

Type: number
Default: 0
Mandatory: false

The text-shadow y offset.

Licensing

The code in this project is licensed under MIT license.