Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-mat-number-input-spinner

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-mat-number-input-spinner

Number Spinner component for Angular Material

  • 1.2.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

NgxMatNumberInputSpinner

Number Spinner component for Angular Material

w3soto

StackBlitz Demo

Screenshot

Features

  • Replace default browser spinner
  • Custom buttons (prefix/suffix) for increment and decrement value
  • Read step, min, max, readonly and disabled properties from input element

Installation

npm -i ngx-mat-number-input-spinner

Example

For more details see projects/demo application

import { NgxMatNumberInputSpinnerModule } from "ngx-mat-number-input-spinner";
...

@NgModule({
  imports: [
    ...,
    NgxMatNumberInputSpinnerModule,
  ],
  ...
})
class AppModule { ... }

Basic template

<mat-form-field>
  
  <input
    matInput
    type="number"
    step=".5"
    min="-10"
    max="10"
    [ngxMatNumberSpinner]="spinner"
    [(ngModel)]="myNumberInputValue">

    <ngx-mat-number-spinner #spinner matSuffix></ngx-mat-number-spinner>
    
</mat-form-field>

Custom template

<mat-form-field>
  
  <input 
    matInput 
    type="number" 
    min="0" 
    max="5" 
    value="0"
    [ngxMatNumberSpinner]="[spinnerUp,spinnerDown]">
    
  <button 
    mat-icon-button 
    color="primary" 
    matPrefix 
    ngxMatNumberIncrementSpinner
    #spinnerUp="ngxMatNumberIncrementSpinner">
    <mat-icon>thumb_up</mat-icon>
  </button>
  
  <button 
    mat-icon-button 
    color="warn" 
    matSuffix 
    ngxMatNumberDecrementSpinner
    #spinnerDown="ngxMatNumberDecrementSpinner">
    <mat-icon>thumb_down</mat-icon>
  </button>
  
</mat-form-field>

Components

  • ngx-mat-number-spinner
@InputTypeDefaultDescription
autoDelaynumber500Delay timeout in milliseconds
autoRepeatnumber25Repeat interval in milliseconds

Exported as ngxMatNumberSpinner

Directives

  • input[ngxMatNumberSpinner]
@InputDescription
ngxMatNumberSpinnerReference to ngx-mat-number-spinner or list of references to ngxMatNumberIncrementSpinner and ngxMatNumberDecrementSpinner

Exported as ngxMatNumberSpinnerInput

  • ngxMatNumberIncrementSpinner
@InputTypeDefaultDescription
ngxMatNumberIncrementSpinnerAutoDelaynumber500Delay timeout in milliseconds
ngxMatNumberIncrementSpinnerAutoRepeatnumber25Repeat interval in milliseconds

Exported as ngxMatNumberIncrementSpinner

  • ngxMatNumberDecrementSpinnerFor
@InputTypeDefaultDescription
ngxMatNumberDecrementSpinnerAutoDelaynumber500Delay timeout in milliseconds
ngxMatNumberDecrementSpinnerAutoRepeatnumber25Repeat interval in milliseconds

Exported as ngxMatNumberDecrementSpinner

Keywords

FAQs

Package last updated on 09 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc