Stepper

stepper control

Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Stepper",
  "description": "config for editor stepper control",
  "type": "object",
  "required": [
    "option",
  ],
  "properties": {
    "control": {
      "const": "stepper",
    },
    "label": {
      "title": "Label",
      "description": "Stepper label",
      "type": "string"
    },
    "min": {
      "type": "integer",
      "description": "Minimum value for stepper"
    },
    "max": {
      "type": "integer",
      "description": "Maximum value for stepper"
    },
    "step": {
      "type": "integer",
      "description": "Step value for stepper"
    },
    "decimals": {
      "type": "integer",
      "description": "Decimal precision for stepper"
    },
    "strings": {
      "type": "object",
      "description": "Strings to add to stepper",
      "properties": {
        "prefix": { 
          "type": "string",
          "description": "string to show before stepper value",
             "example": [
              "multiplier: ",
              "qty: ",
            ]
        },
        "postfix": { 
          "type": "string",
          "description": "string to show after stepper value",
             "example": [
              "px",
              "%",
              "lbs"
            ]
        },
      }
    },
    "value": {
      "type": "integer",
      "description": "Value of stepper"
    },
  }
}

Example

stepper control

{
  "control": "stepper",
  "label": "My Stepper",
  "value": 4,
  "min": 1,
  "max": 10,
  "step": 0.5,
  "strings": {
    "prefix": "qty: ",
    "postfix": "lbs"
  },
}