Features/Components

Widgets (component variables)

Give a component its own fields (text, image, select, color...) so every instance is filled in through a simple form.

A widget is a component with variables. You define fields on the component (title, image, button link, color and so on), use them inside the component, and each instance gets an Edit content form instead of free editing. The fields are defined from the component's Variables option. Each field has a type, a title, a description and a default value. Instances merge their own values with the defaults. Use widgets for blocks that non-designers fill in: team cards, pricing boxes, banners, feature rows.

How it works

  • Field types (html list.settings): Input, Textarea, Select, Image, File, Toggle, Options, Date, Color, Repeater (BLOCKS), Component.
  • Per field: Title, Description, Default Value; Select and Options also take a list of options (title/value).
  • Field names are slugged; a duplicate name is refused ('Provided name alredy exist.').
  • Inside the component the values are available to dynamic text and attributes as the 'widget' object (mdVars merge sets data.widget), for example widget.<field>.
  • Each instance stores its values as JSON in the instance's text slot; mdVars merge fills missing keys with defaults and drops keys that are no longer defined.
  • An instance of a component with variables shows an 'Edit content' button in the Content panel; the canvas locks its inner elements (dh-lock).
  • Stored on the component.
  • MCP limits: variable names a-z A-Z 0-9 - _, max 40 characters; at most 50 variables; at most 500 strings of up to 2000 characters; no ${...} in values.

When to use it

  • A team member card with name, role and photo fields
  • A pricing box whose plan name, price and features are filled per instance
  • A banner where editors choose a color from a Select

Limitations

  • Inner elements of a widget instance cannot be edited directly on the canvas.

Availability

  • Works in Designer and MCP.
  • Included in every plan.
  • Limits: MCP only: max 50 variables per component, names up to 40 characters, strings up to 2000 characters.

How to use it.

  1. Right click the component in the Components tab and choose Variables.
  2. Create a field, pick its type and set a default value.
  3. Bind the field inside the component (dynamic text or attribute using widget.<field>).
  4. Select an instance and click Edit content to fill in its values.

Questions.

What field types can a widget have?

What happens to instances when I add a field?

Related features.

No card needed

Build it today.Pay when it goes live.

Every feature is unmetered while you build. Checkout opens the first time you publish.