A Material Design input field for numric values with step up/down buttons (Polymer 2)

[ This description is mirrored from README.md at github.com/Zecat/paper-relative-integer-input on 2019-01-21 ]

Published on webcomponents.org

<paper-number-input>

A Material Design input field for numeric values with step up/down buttons (Polymer 2).

<paper-number-input
  label="Quantity"
  min="1"
  max="12"
  value="6"
  step="1.1"
  fallback-value="0"
><paper-number-input>

Installation

  bower install -S Zecat/paper-number-input

Usage

For icons to appear, you can either:

  • just import the iron-icons/iron-icons.html Polymer element - it is a dependency of this element but not imported by default
  • create your own icon set and specify stepDownIcon and stepUpIcon properties according
  • import paper-number-input/paper-number-input-icons and define stepDownIcon as 'integer-input:step-down' and stepUpIcon as 'integer-input:step-up'

Install

Link to this version
ImportedReleased 21 December 2017MIT License
Framework Support
Polymer 2.0+
Browser Compatibility
Install with
Release notes - Version 1.1.0

Dependencies

Polymer/polymer#^2.0.0

  • PolymerElements/paper-button#^2.0.0
  • PolymerElements/paper-input#^2.0.0
  • PolymerElements/iron-flex-layout#^2.0.0
  • PolymerElements/iron-icon#^2.0.0
  • PolymerElements/iron-icons#^2.0.0
  • PolymerElements/iron-form-element-behavior#^2.0.0
  • PolymerElements/iron-input#^2.0.0
  • PolymerElements/iron-iconset-svg#^2.0.0