VVibeFlui

Field Types

field.type controls the native input, adapter, or custom rendering strategy.

Supported types

TypeRuntime rendering
textText input.
emailEmail input plus built-in email validation.
passwordPassword input.
numberNumber input, emits number or empty string.
textareaMultiline text area.
selectNative select.
multiselectNative multiple select.
checkboxNormal boolean checkbox.
switchBoolean sliding toggle for toggle, on-off, and slide controls.
radioSingle selection from options.
radio-groupSingle selection from options.
checkbox-groupMultiple selections from options.
dateDate input.
datetimedatetime-local input.
timeTime input.
fileFile input.
imageFile input with accept="image/*".
hiddenHidden input.
colorColor input.
rangeRange input, emits number or empty string.
jsonTextarea with monospace style, unless an adapter overrides it — for example adapter: "editorjs" from @vibeflui/editors swaps in an Editor.js block editor (see Editors).
codeTextarea with monospace style.
richtextTextarea unless an adapter/component overrides it.
markdownTextarea unless an adapter/component overrides it.
tagsComma-separated text input, emits string[].
comboboxText input with datalist.
autocompleteText input with datalist.
customRegistry component or missing-component placeholder.

Boolean and option controls

Use switch for toggle, on-off, and slide UI. Use checkbox for a normal checkbox. Use checkbox-group when the user can choose multiple option values. Use radio or radio-group when the user chooses one option value. Do not use checkbox-toggle; it is not an official field type in the current source.

schemas/users/user-preferences.schema.ts

TS
export const userPreferencesSchema = {
  resource: "users",
  form: {
    fields: [
      { name: "enabled", label: "Enabled", type: "switch", defaultValue: true },
      { name: "acceptedTerms", label: "Accepted Terms", type: "checkbox" },
      {
        name: "contactMethod",
        label: "Contact Method",
        type: "radio-group",
        options: [
          { label: "Email", value: "email" },
          { label: "SMS", value: "sms" }
        ]
      },
      {
        name: "notificationChannels",
        label: "Notification Channels",
        type: "checkbox-group",
        options: [
          { label: "Email", value: "email" },
          { label: "SMS", value: "sms" }
        ]
      }
    ]
  }
} as const;

Type inference

String fields are expanded automatically.

TS
form: {
  fields: ["name", "email", "password", "isEnabled", "createdAt"]
}

VibeFlui infers common field types from the field name:

Name patternInferred type
contains emailemail
contains passwordpassword
ends with id, contains count, contains totalnumber
contains description, notes, or contenttextarea
contains date or ends with atdate
starts with is, starts with has, contains enabledcheckbox
otherwisetext

Name-based inference preserves the current source behavior and maps boolean-looking names to checkbox. Use an explicit type: "switch" when the field should render as a sliding toggle.

Explicit field types

TS
export const usersSchema = {
  resource: "users",
  form: {
    fields: [
      { name: "email", type: "email" },
      { name: "age", type: "number" },
      { name: "bio", type: "textarea" },
      { name: "status", type: "select" },
      { name: "permissions", type: "checkbox-group" },
      { name: "metadata", type: "json" }
    ]
  }
} as const;