ngx-input-counter
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

NgxInputCounter

The input number with counter for Angular

Getting Started

Versions

Angular ngx-input-counter
>=15.0.0 v0.0.x

Instalation

npm i ngx-input-counter

Usage

Import the module

import { NgxInputCounterModule } from 'ngx-input-counter';
@NgModule({
  ...
  imports: [
    ...,
    NgxInputCounterModule,
  ],
})

Use in your components

<ngx-input-counter [(ngModel)]="qty"></ngx-input-counter>

Props

Name Type Default Description
value number 0 Initial state of the toggle button
min number -Infinity Transition time for the animation
max number Infinity Transition time for the animation
step number 1 Transition time for the animation
minusTemplate TemplateRef - Pass a TemplateRef to replace the minus button content
plusTemplate TemplateRef + Pass a TemplateRef to replace the plus button content
minusClass string 'ngx-input-counter-button' Classes of the minus button
plusClass string 'ngx-input-counter-button' Classes of the plus button
valueClass string 'ngx-input-counter-value' Classes of value text
disabled boolean false Disables the buttons

Outputs

Name Payload Description
change value Triggered when state of the component changes.
Contains:
value - state of the component

Package Sidebar

Install

npm i ngx-input-counter

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

77.7 kB

Total Files

16

Last publish

Collaborators

  • vicmans