Block Schema & Field Types

All field types, configuration options, repeaters, conditional fields, and field groups.

Last updated: March 20, 2026

All Field Types

TypeDescriptionDefault Value Type
singleLineSingle-line text inputstring
multiLineMulti-line textareastring
richTextWYSIWYG editor (Tiptap)string (HTML)
numericNumber inputnumber
booleanToggle switchboolean
dateDate pickerstring (ISO)
colorColor pickerstring (hex)
sliderRange slidernumber
mediaImage/video uploadstring (URL)
linkInternal/external URLstring
selectDropdown (single)string
multiselectMultiple choicestring[]
repeaterArray of objectsArray<object>
pageSelectorSelect workspace pagesPageRef[]
formSelect workspace formstring
emailTemplateEmail template pickerstring
emailConfigurationEmail config pickerstring

Field Configuration

Every field supports these base options:

{
  type: "singleLine",
  label: "Heading",
  required?: true,
  defaultValue?: "Welcome",
  placeholder?: "Enter text",
  helpText?: "Main heading",
  group?: "Content",
  showWhen?: { field: "showTitle", equals: true },
  validation?: {
    minLength: 3, maxLength: 100,
    pattern: "url",  // Built-in: "email", "url", "phone", "slug"
    message: "Must be valid"
  }
}

Select & Multiselect

schema: {
  layout: {
    type: "select",
    label: "Layout",
    options: [
      { value: "grid", label: "Grid" },
      { value: "list", label: "List" },
      { value: "carousel", label: "Carousel" }
    ],
    defaultValue: "grid"
  },
  tags: {
    type: "multiselect",
    label: "Tags",
    options: [
      { value: "featured", label: "Featured" },
      { value: "new", label: "New" }
    ]
  }
}

Repeater (Arrays)

schema: {
  features: {
    type: "repeater",
    label: "Features",
    maxItems: 6,
    schema: {
      icon: { type: "singleLine", label: "Icon Name", defaultValue: "Star" },
      title: { type: "singleLine", label: "Title", required: true },
      description: { type: "multiLine", label: "Description" }
    }
  }
}

In your component:

export default function Features({ content }) {
  return (
    <div className="grid grid-cols-3 gap-6">
      {(content.features ?? []).map((f, i) => (
        <div key={i}><h3>{f.title}</h3><p>{f.description}</p></div>
      ))}
    </div>
  );
}

Conditional Fields (showWhen)

schema: {
  showButton: { type: "boolean", label: "Show CTA", defaultValue: true },
  buttonText: {
    type: "singleLine",
    label: "Button Text",
    defaultValue: "Learn More",
    showWhen: { field: "showButton", equals: true }
  },
  buttonUrl: {
    type: "link",
    label: "Button URL",
    showWhen: { field: "showButton", equals: true }
  }
}

Conditions: equals, notEquals, notEmpty, isEmpty.


Field Groups

Organize fields into collapsible sections:

schema: {
  heading: { type: "singleLine", label: "Heading", group: "Content" },
  description: { type: "multiLine", label: "Description", group: "Content" },
  backgroundColor: { type: "color", label: "Background", group: "Styling" },
  padding: { type: "slider", label: "Padding", min: 0, max: 100, group: "Styling" }
}
Block Schema & Field Types — Cmssy CLI | Cmssy