Number Field

<sw-number-field> extends <sw-text-field>

ready
Number field component which supports Int and Float with optional min, max and step.

Usage

Loading...
<sw-number-field type="number" label="Name" v-model="model" numberType="int"
:max="20" :min="5" :step="5"></sw-number-field>

Component properties

Property name Type Default
numberType String float
step Number
min Number
max Number
value Number
digits Number 2

Methods

Method name Parameters
onChange event
onInput event
increaseNumberByStep No parameters
decreaseNumberByStep No parameters
computeValue stringRepresentation
parseValue value
checkBoundaries value
getNumberFromString value
checkForInteger value
applyDigits decimals

Imports

  • ./sw-number-field.html.twig
  • ./sw-number-field.scss

Watcher

  • value

Twig blocks

  • sw_number_field

Slots

  • suffix