1.0.0 • Published 10 months ago
nice-number-js v1.0.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-js
to 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-js
to your HTML input number. You can also provide custom css class name withclassName
option.
const inputNumber = document.getElementById("myInput");
new NiceNumber(inputNumber, {
className: `custom-css-class-name`,
});
1.0.0
10 months ago