VVibeFlui

Field Properties

Fields are configured through form.fields.

Core properties

PropertyTypePurpose
namestringForm value path. Supports nested paths through VibeFlui path helpers.
labelstringVisible field label. Defaults from name.
typefield typeInput type. Defaults by inference.
valueFromstringRow path used when mapping edit/view values. Defaults to name.
defaultValueunknownDefault value used by default value modes and fallback row mapping.
placeholderstringNative input placeholder.
helperTextstringHelper text below the control.
classNamestringField wrapper class hook.

State properties

PropertyPurpose
hiddenExcludes the field from rendering and value mapping.
disabledDisables the input.
readonlyRenders the input as read-only.
visibleWhenConditionally renders the field.

Registry properties

PropertyRegistry slot
componentregistry.components
adapterregistry.fieldAdapters
validatorregistry.validators
transformerregistry.transformers
computedregistry.computedResolvers
optionLoaderregistry.optionLoaders

Example

TS
export const usersSchema = {
  resource: "users",
  form: {
    fields: [
      {
        name: "profile.firstName",
        label: "First name",
        type: "text",
        required: true,
        minLength: 2,
        helperText: "Use the user's legal first name."
      },
      {
        name: "roleId",
        label: "Role",
        type: "select",
        valueFrom: "role.id",
        optionLoader: "users.roles"
      },
      {
        name: "internalNotes",
        type: "textarea",
        visibleWhen: {
          key: "roleId",
          operator: "equals",
          value: "admin"
        }
      }
    ]
  },
  registry: {
    optionLoaders: ["users.roles"]
  }
} as const;