defineBlokkli() and read their current values through the reactive options object it returns. Changes made in the editor are reflected instantly in the rendered block — no save or reload required.
Defining Options
Pass anoptions object to defineBlokkli(). Each key becomes an option name; the value is an option definition that describes the input type, display label, and default value:
options object:
Option Types
text
A single-line text input. Use it for short freeform values like button labels, override headings, or custom identifiers.
checkbox
A boolean toggle rendered as a checkbox. The value is true when checked and false (or undefined if unset) when not.
checkboxes
A multi-select input where editors can pick any combination of the defined choices. The returned value is an array of the selected keys.
v-for or .includes() checks in your template to act on the selected values:
radios
A single-select input where editors pick exactly one of the defined choices. The returned value is the key of the selected option.
displayAs property to control how the choices are rendered in the editor panel:
displayAs value | Appearance |
|---|---|
'radios' | Standard radio button list (default) |
'grid' | Compact grid of buttons — good for numeric or short values |
'colors' | Colour swatches — use when option keys are CSS colour values |
'icons' | Icon button grid — use when options map to icon names |
color
An HTML colour picker that returns a hex string. Use it for background colours, text colours, or any CSS colour value that editors should control.
range
A slider input for selecting a value within a numeric range. Ideal for spacing scales, opacity, border radius, or any value where approximate adjustment is more important than precision.
number
A direct numeric input field. Use it when precision matters and a slider would be cumbersome — for example, an exact pixel value or an item count.
Both
range and number accept min and max constraints. blökkli enforces these bounds in the editor UI — editors cannot enter values outside the declared range.Grouping Options
Add agroup string to any option definition to cluster related options under a labelled section heading in the options panel. Options without a group appear in a default ungrouped section.
Global Options
For options that apply to many blocks (for example, a site-wide spacing scale or colour scheme), define them once innuxt.config.ts and reference them by key using the globalOptions array:

