Skip to content

Numbers


Number / Integer — UInputNumber

Trigger: schema type: "number" or "integer".

API

NameTypeDefaultDescription
stepNumber1 (integer) / 0.1 (number)Step of the +/- buttons.
placeholderStringPlaceholder.
inputNumberObjectPass-through → UInputNumber.

The minimum / maximum bounds come from the schema.

Examples

json
{
  "type": "integer",
  "title": "Age",
  "minimum": 0,
  "maximum": 120
}
json
{
  "type": "Control",
  "scope": "#/properties/age",
  "options": { "step": 1, "inputNumber": { "size": "md" } }
}
json
{
  "type": "Control",
  "scope": "#/properties/price",
  "options": { "step": 0.01, "placeholder": "0.00" }
}

Slider — USlider

Trigger: options.slider: true or an object of Nuxt UI props (options.slider: { size, color, … }).
The schema must declare minimum and maximum (no default needed — unlike the stock JSON Forms isRangeControl tester).

API

NameTypeDefaultDescription
sliderBoolean | Objecttrue enables the renderer. An object enables it too and is spread onto USlider.
stepNumberschema.multipleOf | 1Slider step (takes precedence over multipleOf).
hideValueBooleanHides the numeric badge on the right (tooltip kept).

The schema’s minimum / maximum / multipleOf drive min / max / step.

Examples

json
{
  "type": "number",
  "title": "Volume",
  "minimum": 0,
  "maximum": 100,
  "multipleOf": 5
}
json
{
  "type": "Control",
  "scope": "#/properties/volume",
  "options": { "slider": true }
}

With Nuxt UI props + a decimal step:

json
{
  "type": "Control",
  "scope": "#/properties/temperature",
  "options": {
    "slider": { "size": "lg", "color": "primary" },
    "step": 0.5
  }
}

Playground


Rating — UInputRating

Trigger: options.format: "rating".

API

NameTypeDefaultDescription
format"rating"Required.
lengthNumberschema.maximumNumber of icons.
iconString(Nuxt UI)Filled icon (e.g. i-lucide-star).
emptyIconStringEmpty icon.
hideValueBooleanHides the numeric label next to it.
clearableBooleantrue when not requiredClick again to clear.
inputRatingObjectPass-through → UInputRating.

Examples

json
{
  "type": "integer",
  "title": "Satisfaction",
  "minimum": 1,
  "maximum": 5
}
json
{
  "type": "Control",
  "scope": "#/properties/satisfaction",
  "options": { "format": "rating" }
}
json
{
  "type": "Control",
  "scope": "#/properties/heat",
  "options": {
    "format": "rating",
    "length": 5,
    "icon": "i-lucide-flame",
    "emptyIcon": "i-lucide-flame",
    "hideValue": true,
    "clearable": true
  }
}

Released under the BSD-3-Clause License.