Skip to content

Text & media ​

Controls based on string (and object for the WYSIWYG editor).


String — UInput ​

Trigger: type: "string" (no multi, no special format).

API ​

NameTypeDefaultDescription
restrictBoolean—Enforces schema.maxLength and shows a character counter.
inputObject—Pass-through → UInput (size, color, ui, …).

The common options (placeholder, focus, …) apply as well.

Examples ​

json
{
  "type": "Control",
  "scope": "#/properties/name",
  "options": {
    "placeholder": "Camille Dupont",
    "input": { "size": "lg" }
  }
}
json
{
  "type": "Control",
  "scope": "#/properties/slug",
  "options": { "restrict": true }
}

Matching schema for restrict:

json
{
  "type": "string",
  "maxLength": 32,
  "title": "Slug"
}

Textarea — UTextarea ​

Trigger: options.multi: true.

API ​

NameTypeDefaultDescription
multiBoolean—Required to enable the textarea renderer.
rowsNumber30Maximum height (autoresize).
minRowsNumber—Initial / minimum number of rows.
textareaObject—Pass-through → UTextarea.

Examples ​

json
{
  "type": "Control",
  "scope": "#/properties/description",
  "options": {
    "multi": true,
    "minRows": 3,
    "rows": 12,
    "placeholder": "Long description…"
  }
}

Password ​

Trigger: schema format: "password".

Same options as String (placeholder, input, …). The show / hide button is built in.

Example ​

json
{
  "type": "string",
  "format": "password",
  "title": "Password"
}
json
{
  "type": "Control",
  "scope": "#/properties/password",
  "options": { "placeholder": "••••••••" }
}

Pin — UPinInput ​

Trigger: options.format: "pin".

API ​

NameTypeDefaultDescription
format"pin"—Required to select this renderer.
lengthNumberinferred (maxLength / pattern)Number of cells.
type"text" | "number"inferredKeyboard / input type.
maskBoolean—Masks the typed characters.
otpBoolean—Enables SMS OTP autocomplete.
pinInputObject—Pass-through → UPinInput.

Examples ​

json
{
  "type": "Control",
  "scope": "#/properties/code",
  "options": { "format": "pin", "otp": true }
}
json
{
  "type": "Control",
  "scope": "#/properties/secretCode",
  "options": { "format": "pin", "mask": true, "length": 6 }
}
json
{
  "type": "Control",
  "scope": "#/properties/token",
  "options": { "format": "pin", "length": 8, "type": "text" }
}

Color — UColorPicker ​

Trigger: schema format: "color" or options.format: "color".

API ​

NameTypeDefaultDescription
format"color"—Forces the color picker when the schema has no format: "color".
colorFormat"hex" | "rgb" | "hsl" | "cmyk" | "lab""hex"Notation emitted in the data.
showInputBooleantrueShows the text field next to the picker. false = picker only.
colorPickerObject—Pass-through → UColorPicker.
inputObject—Pass-through → the hex/text UInput.

Examples ​

json
{
  "type": "Control",
  "scope": "#/properties/brandColor",
  "options": { "format": "color", "colorFormat": "rgb" }
}
json
{
  "type": "Control",
  "scope": "#/properties/accent",
  "options": { "format": "color", "showInput": false }
}

File upload — UFileUpload ​

Trigger: schema format: "data-url" or options.format: "file".
Multi-file: schema type: "array" of string items.

API ​

NameTypeDefaultDescription
format"file"—Forces the upload control (useful for an array without format: data-url).
acceptStringschema contentMediaTypeMIME filter (image/*, application/pdf, …).
dropLabelString—Title of the drop zone.
dropDescriptionString—Sub-text of the drop zone.
layoutString"list"Nuxt UI layout ("list", "grid", …).
fileUploadObject—Pass-through → UFileUpload.

Examples ​

json
{
  "type": "Control",
  "scope": "#/properties/cv",
  "options": {
    "accept": "application/pdf",
    "dropLabel": "Drop your résumé"
  }
}
json
{
  "type": "Control",
  "scope": "#/properties/photos",
  "options": {
    "format": "file",
    "dropLabel": "Drop images here",
    "layout": "grid"
  }
}

Autocomplete API — UInputMenu ​

Trigger: presence of options.api.

API ​

NameTypeDefaultDescription
apiObject—Required. Remote fetch configuration (see below).
minLengthNumber(internal)Minimum number of characters before the request.
suggestionString[]—Local fallback suggestions.
placeholderString—Field placeholder.
inputMenuObject—Pass-through → UInputMenu.

api object ​

NameTypeDefaultDescription
urlString—Required. Endpoint path or URL.
baseString—Origin prefix (e.g. https://api.example.com).
queryKeyString"q"Name of the search parameter.
paramsObject—Fixed query parameters.
headersObject—HTTP headers.
itemsPathString—Dot path to the array in the JSON response.
labelKeyString"label"Path to an item’s label.
valueKeyString"value"Path to the stored value.

Example ​

json
{
  "type": "Control",
  "scope": "#/properties/addressId",
  "options": {
    "placeholder": "Search for an address…",
    "minLength": 3,
    "api": {
      "base": "https://data.geopf.fr",
      "url": "/geocodage/search",
      "queryKey": "q",
      "itemsPath": "features",
      "labelKey": "properties.label",
      "valueKey": "properties.id"
    }
  }
}

WYSIWYG — UEditor ​

Trigger: options.wysiwyg: true on an object control (or string, depending on contentType).
Requires allRenderers (not just nuxtUiRenderers).

API ​

NameTypeDefaultDescription
wysiwygBoolean—Required (true) to enable the editor.
contentType"json" | "html" | "markdown"inferredStored format: ProseMirror object (json), HTML string (html) or Markdown string (markdown, string schema).
toolbarArray | falsebuilt-in toolbarReplaces the toolbar (EditorToolbarItem[][]) or hides it.
placeholderString—Editor placeholder.
featuresfalse | Objectall onTables, task lists, alignment, colors, highlight, link, find & replace, source, preview.
bubbleMenuBooleanfalseFormatting bubble on selection.
slashCommandsBooleanfalse/ command palette.
aiObject—Optional AI assistant (enabled, endpoint or transport, actions…).
editorObject—Pass-through → UEditor.

Editing features, the AI assistant and an AI SDK backend are detailed in WYSIWYG editor & AI.

Examples ​

json
{
  "type": "Control",
  "scope": "#/properties/body",
  "options": { "wysiwyg": true, "contentType": "json" }
}
json
{
  "type": "Control",
  "scope": "#/properties/notesHtml",
  "options": {
    "wysiwyg": true,
    "contentType": "html",
    "placeholder": "HTML input…"
  }
}
json
{
  "type": "Control",
  "scope": "#/properties/article",
  "options": {
    "wysiwyg": true,
    "contentType": "markdown",
    "density": "prose"
  }
}

With markdown, the value is serialized by TipTap's Markdown extension (loaded by UEditor): headings, lists, links, code, tables and images (![alt](src)) round-trip; the width of a resized image has no Markdown equivalent and is not kept. Source mode then edits the raw Markdown.

Playground ​

Released under the BSD-3-Clause License.