Skip to content

Rating

rating

Description

Simplified range used for a rating generally 0-5 or 1-10.

Attributes

  • minimum
  • maximum
  • multipleOf: display increment within an slider by default 1
  • $capture.icons: optional icon array
  • $capture.marks: true | false, show marks on the line
  • $capture.markLabel: "auto"|"on"|"off", show label bubble
  • $capture.onClick: array matching enum that contains corresponding values when clicked or null to ignore, if not provided the clicks will not perform any action
  • default: set default value in slider
  • enum: labels to display; they will be spaced evenly and do not need to match the full range.

Example

{
  "type": "integer",
  "title": "How do you feel?",
  "$capture": {
    "as": "rating",
    "icons": [
      "fal fa-frown-open",
      "fal fa-frown",
      "fal fa-meh",
      "fal fa-grin-beam"
    ]
  },
  "default": 3,
  "minimum": 1,
  "maximum": 8
}