Skip to content

Nuxt UI pass-through

Any object placed under the named key in options is spread onto the target Nuxt UI component (size, color, variant, ui, … props). This mirrors the native attributes Quasar / Vuetify forward outside their documented API.

API — keys

NameTarget componentUsed by
formFieldUFormFieldAll wrapped controls
inputUInputstring, password, color (text field)
textareaUTextareamulti: true
inputNumberUInputNumbernumber / integer
sliderUSliderslider: true (also when the object is the value of slider)
inputRatingUInputRatingformat: "rating"
checkboxUCheckboxboolean
switchUSwitchboolean + toggle
checkboxGroupUCheckboxGroupmulti-enum
radioGroupURadioGroupformat: "radio"
selectUSelectformat: "select", oneOf
selectMenuUSelectMenuenum by default
inputMenuUInputMenuapi
pinInputUPinInputformat: "pin"
inputTagsUInputTagsformat: "tags"
colorPickerUColorPickercolor
fileUploadUFileUploadfile / data-url
inputDateUInputDatedate / date-time
inputTimeUInputTimetime
calendarUCalendarcalendar / date popover
calendarCardcalendar carddates
timeCard / timeHour / timeMinute / timeSecondtime partstime
editorUEditorwysiwyg
cardUCardGroup
tabsUTabsCategorization
stepperUStepperCategorization + variant: "stepper"

See the Nuxt UI docs for each component’s prop list.

Examples

Large text field + ui classes

json
{
  "type": "Control",
  "scope": "#/properties/name",
  "options": {
    "input": {
      "size": "lg",
      "color": "primary",
      "ui": { "base": "tracking-wide font-medium" }
    }
  }
}

Compact FormField

json
{
  "type": "Control",
  "scope": "#/properties/code",
  "options": {
    "formField": {
      "size": "sm",
      "ui": { "label": "text-muted" }
    }
  }
}

Radio in list variant

json
{
  "type": "Control",
  "scope": "#/properties/plan",
  "options": {
    "format": "radio",
    "radioGroup": {
      "variant": "list",
      "orientation": "horizontal",
      "size": "md"
    }
  }
}

Group as an outline card

json
{
  "type": "Group",
  "label": "Profile",
  "elements": [],
  "options": {
    "card": {
      "variant": "outline",
      "ui": { "header": "font-semibold" }
    }
  }
}

Playground

The showcases often pass pass-through objects (input, radioGroup, card, …). See the catalogue.

Released under the BSD-3-Clause License.