Licence
ISC
Version
1.0.0
Deps
0
Size
9 kB
Vulns
0
Weekly
0
Nice Number JS
Nicely format HTML input number fields with Nice Number JS.
Table of Contents
Introduction
Nice Number JS is a lightweight JavaScript library that enhances the appearance and user experience of HTML input number fields. It provides a simple and customizable way to format input numbers to make them visually appealing and user-friendly.

Features
- No dependencies.
- Format HTML input number fields with button control.
- Apply custom styles to the input number elements.
Installation
You can install Nice Number JS via npm:
npm install nice-number-js
Usage
- Import
nice-number-jsto your javascript code.
import NiceNumber from "nice-number-js";
- Include the style to your project css
@import "./node_modules/nice-number-js/dist/css/nice-number.min.css";
- Initialize
nice-number-jsto your HTML input number. You can also provide custom css class name withclassNameoption.
const inputNumber = document.getElementById("myInput");
new NiceNumber(inputNumber, {
className: `custom-css-class-name`,
});