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

bootstrap-react-numeric-up-down

v1.0.5

Published

A numeric-up-down control for react with bootstrap styling

Downloads

12

Readme

bootstrap-react-numeric-up-down

NumericUpDown

Installation

npm install bootstrap-react-numeric-up-down @fortawesome/fontawesome-svg-core @fortawesome/free-solid-svg-icons @fortawesome/react-fontawesome

(Because I couldn't figure out how to get optional dependencies to play nice with rollup and next.js client-side, unfortunately the @fortawesome packages are requirements (peer dependencies). I'd be more than happy to incorporate a PR if someone wants to figure it out for me.)

Usage

import NumericUpDown from 'bootstrap-react-numeric-up-down';

export default function MyComponent({value, min, max, step, ...otherProps}) {
    return (
        <NumericUpDown value={value} min={min} max={max} step={step} {...otherProps} />
    );
};

Properties

| name | type | default | description | |-------------------------------|------------------------------------------|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| | allowManualInputWithNaNBounds | boolean? | false | By default, if the min is greater than the max, the <input> is disabled. If set, it will not be disabled. (Your mileage may vary.) | | iconColor | (string|{minus: string, plus: string})? | undefined | The bootstrap theme for coloring the button icons. | | inputAlign | 'left' | 'center' | 'right' | 'center' | The text-alignment of the <input>. | | inputColor | string? | undefined | The bootstrap theme for coloring the <input>. | | disabled | bool? | false | The disabled property assigned to the <input>. If set, also disables the plus and minus buttons. | | max | (number|string)? | Infinity | The max value applied to the <input>. | | min | (number|string)? | -Infinity | The min value applied to the <input>. | | minusIcon | (string|element|object)? | faMinusCircle | The text or icon to use for the minus button. | | onChange | function? | undefined | The callback called when the value of the <input> changes. | | plusIcon | (string|element|object)? | faPlusCircle | The text or icon to use for the plus button. | | step | (number|string)? | 1 | The step value applied to the <input>. | | value | (number|string)? | undefined | The value property applied the <input>. |

For the plusIcon and minusIcon properties, if an object is specified, it must match the IconDefinition shape defined by @fortawesome:

interface IconDefinition extends IconLookup {
  icon: [
    number, // width
    number, // height
    string[], // ligatures
    string, // unicode
    string // svgPathData
  ];
}

interface IconLookup {
  prefix: IconPrefix;
  iconName: IconName;
}

Sorry I don't have time to add better explanations for the functionality.