Property and style editing
Property and style editing gives the visual builder a focused inspector for the selected block. It lets an author change block values, visual styles, responsive overrides, HTML attributes, and content-specific options while the canvas shows the result. The inspector works with the selection and active breakpoint managed by the visual builder workspace, while the block tree and history systems apply and retain the changes.
Inspector panel
Selection context
The inspector is available when one or more blocks are selected. It reads shared values across the selection and reports a mixed state when selected blocks do not have the same value. The available sections and controls change with the block type, its parent, the editing mode, and whether the selection contains several blocks.
The property search filters both section names and control keywords. This keeps the panel usable even when a block exposes many options. A section can also start open or closed based on whether it has relevant values.
References: frontend/…/BlockProperties.vue• L1-67 frontend/…/index.ts• L24-66 frontend/…/blockController.ts• L9-107
Control value model
The controls separate a value that is set on the selected block from a value that the block receives through its style or data context. A blank control can therefore show an inherited value without creating a local override. Clearing a value removes the local setting so the normal fallback can apply again.
Many controls also support a dynamic value. A dynamic value points to data from the page script, component data, or component properties instead of storing a fixed value. The control shows the active data key over the normal input and lets the author clear the binding or choose another source. The available sources follow the selected block's data scope, including repeater context.
Controls can present a value through a label, a text field, a select list, a toggle, or a range slider. Numeric controls accept a unit and support direct entry, keyboard adjustment, and label dragging when the control enables it. Plain numeric fields can also show increment and decrement buttons when the value and field width support them; holding a button repeats the change. Basic inputs debounce change events, select their text on focus, and can clear a current value when the field supports clearing. Searchable controls can load options as the author types, show a readable label for a stored value, and still commit the underlying value. When the author uses the arrow keys, pressing Enter commits the highlighted option. Typed text still becomes an arbitrary value when the control allows it.
References: frontend/…/BasePropertyControl.vue• L105-178 frontend/…/BasePropertyControl.vue• L200-329 frontend/…/PropertyControlInput.vue• L1-35 frontend/…/DynamicValueHandler.vue• L116-210 frontend/…/OptionToggle.vue• L41-63 frontend/…/NumberArrows.vue• L48-81 frontend/…/InlineInput.vue• L95-166 frontend/…/Autocomplete.vue• L246-341 frontend/…/Input.vue• L58-182 frontend/…/blockController.ts• L119-160
Editing flow
The inspector turns a control change into a block update, and the canvas then renders the selected block with the new state. This diagram shows the main relationship between selection, control choice, block state, and canvas feedback.
flowchart LR
S[Selected block] --> I[Inspector sections]
I --> C[Property or style control]
C --> U[Block state update]
U --> R[Canvas render]
R --> I
The shared controller applies an edit to every selected block when the control supports multi-selection. Type-specific controls can instead limit an option to one block or to a matching block type. The editor canvas interaction page explains how selection and direct canvas actions supply this context.
References: frontend/…/BlockProperties.vue• L15-27 frontend/…/StylePropertyControl.vue• L106-117 frontend/…/blockController.ts• L28-47
Search and replace
Block search gives authors a way to find values across the block tree without opening each block. It can search content, styles, attributes, classes, element tags, and data links. Results focus the matching block in the canvas and are limited to the first 50 matches.
The same panel can replace matching text in one result or across all displayed results. Authors can narrow the search by property group or start from the selected block's subtree. Content, style, attribute, and class matches support replacement. Tag and data matches help locate blocks but do not provide replacement behavior, so a replace action can report that no replacement was made for those fields. Read-only mode keeps the panel available for search but removes replacement mode.
References: frontend/…/SearchBlock.vue• L1-143 frontend/…/SearchBlock.vue• L167-260 frontend/…/SearchBlock.vue• L352-487
Block properties
Component options
Component options describe values exposed by a reusable block or component. The inspector creates a suitable input for each declared option, such as text, number, boolean, select, array, object, image, or color. Authors can set a fixed value or connect the option to a dynamic source.
These options form the boundary between the block instance and its component definition. Changes affect the selected instance without requiring the author to edit the block tree directly. For the wider component and block model, see block composition system.
References: frontend/…/StandardPropsInputSection.ts• L11-92 frontend/…/StandardPropsInputSection.ts• L113-152 frontend/…/blockController.ts• L326-345
Content options
Content controls edit the content carried by a block rather than its visual box. Text and button blocks expose text content. HTML blocks expose an HTML editor. Code-backed values use a language-aware editor for block, page, or component values. The editor can commit on blur or editor save, or wait for an explicit Save button when the control uses that mode. A dirty marker shows pending edits for explicit-save fields.
The code editor supports JavaScript, Python, HTML, CSS, and JSON. Its find panel supports case-sensitive, whole-word, and regular-expression matching. It can move through matches, select all matches, and optionally replace one or all matches. Read-only values do not expose save or replace actions. The editor also uses the selected block's available properties as context for code completion where the language mode supports it. Structured values are parsed before a value is sent back to the block, page, or component, so incomplete structured text does not replace the last valid value. The editor keeps its text and history stable when the parent echoes a value that it just saved.
Images provide a source, alternate text, dark-mode source, fit, focal position, and view box options. Authors can enter an image URL or use the upload control to add, replace, or remove an image source. The image focus control shows the visible crop, lets the author place the focal point, and supports a bounded zoom crop when the block exposes a view box. The crop frame follows the image and element aspect ratios, so a focal-point or crop-window edit matches the result on the canvas. The assets and block templates page explains the wider asset flow. Videos provide a source, poster, playback controls, autoplay, muted, and loop options. These settings preserve the content behavior while style controls handle the surrounding presentation.
References: frontend/…/TypographySection.ts• L17-36 frontend/…/HTMLOptionsSection.ts• L7-41 frontend/…/CodeEditor.vue• L1-179 frontend/…/CodeMirrorEditor.vue• L21-165 frontend/…/CustomSearchPanel.vue• L1-177 frontend/…/ImageOptionsSection.ts• L9-85 frontend/…/ImageUploader.vue• L1-36 frontend/…/ImageFocusInput.vue• L151-337 frontend/…/ImageUploadInput.vue• L1-127 frontend/…/VideoOptionsSection.ts• L8-109
Link options
Link controls turn a block into a link when an author supplies a destination. They also set whether the destination opens in the same tab or a new tab. Click tracking is exposed as a separate option and is stored as block metadata for later tracking behavior.
Removing the destination can remove the link behavior. This makes the link field a structural option as well as a content field. Image and SVG blocks can be converted to links without changing the visible asset.
References: frontend/…/LinkSection.ts• L7-98 frontend/…/blockController.ts• L188-200 frontend/…/blockController.ts• L304-324
Layout and appearance
Layout controls
Layout controls define how a container arranges its children. An author can choose a stack based on flex layout or a grid layout, then set the relevant alignment, direction, wrapping, order, track, and gap behavior. The inspector shows child-placement controls when the selected block or its parent uses that layout.
Changing the layout type can add a usable starting arrangement. Numeric grid column and row fields provide stepper arrows when the value is a simple supported number and the field is wide enough. Holding an arrow repeats the change after a short delay. Searchable numeric and option fields preserve the distinction between a displayed label and the value stored in the block, so keyboard selection does not write the wrong layout value. The control set remains conditional so text, media, form, and root blocks do not receive layout choices that do not fit their role.
References: frontend/…/LayoutSection.ts• L28-134 frontend/…/BlockFlexLayoutHandler.vue• L1 frontend/…/BlockGridLayoutHandler.vue• L1 frontend/…/NumberArrows.vue• L57-81 frontend/…/Autocomplete.vue• L225-341 frontend/…/Input.vue• L83-155
Spacing controls
Spacing controls edit margin, padding, and layout gap. Each value can be edited as a whole box or by side. The control can use one shared value for all sides or switch to separate side values. When selected blocks have different side values, the control exposes that split state rather than hiding the difference. The control preserves the relationship between a shorthand value and its side values, which lets authors make one precise change without losing the other sides.
Margin is not offered for the root block. Padding remains available as an inner-space setting, while gap belongs to the layout relationship between children. The canvas interaction tools use the same spacing model when an author changes spacing directly on the canvas.
References: frontend/…/SpacingSection.ts• L5-60 frontend/…/LayoutSection.ts• L11-26 frontend/…/SplitModeInput.vue• L95-133 frontend/…/SplitInput.vue• L79-137 frontend/…/cssUtils.ts• L223-239 frontend/…/useSpacingHandler.ts• L41-103
Dimension controls
Dimension controls set width and height limits. They support direct dimensions and common content-driven values such as automatic sizing, fit-content, and full stretch. These controls describe the block's size without replacing the position or layout controls.
References: frontend/…/DimensionSection.ts• L4-79 frontend/…/DimensionInput.vue• L1-33
Typography controls
Typography controls shape text presentation. They cover font family, weight, size, line height, letter spacing, text transform, and alignment where those options apply. Text content and typography stay in the same inspector area because both affect how a reader sees the block's words.
Font choices use the site's available font list. Numeric controls accept units and can be adjusted with a slider, while alignment and transform use fixed choices. The site configuration and design tokens page describes the shared font and design settings that can influence these choices.
References: frontend/…/TypographySection.ts• L37-189 frontend/…/fontManager.ts• L1 frontend/…/BasePropertyControl.vue• L180-218
Visual style controls
Visual style controls change the block's surface and visual response. They cover opacity, backgrounds, text and border color, border width and style, shadows, corner radius, overflow, cursor, stacking order, and rotation. Some controls add the supporting style that makes the chosen value visible, such as a border width and style when an author chooses a border color.
Color controls accept fixed colors and site color tokens. A color token is a named CSS variable that keeps a shared color value consistent across blocks. The color picker can resolve a token for preview, save a new color as a token, use recent colors, and use the browser eyedropper when available. Invalid typed colors do not replace the last valid value. Recent colors are recorded when the picker closes on an applied color rather than for every pointer movement.
Background controls also support editable gradients. Authors can choose a linear or radial gradient, set its angle when relevant, add or move color stops, edit each stop, and reuse recent or built-in gradients. Changing the gradient type also changes an incompatible angle to a valid value. Dragging a color or gradient control groups the live changes as one history action when the editor history supports it.
Background and image controls can offer local optimization when the current image source supports it. Style controls therefore affect both the appearance in the canvas and the asset path used by the authored page.
References: frontend/…/StyleSection.ts• L20-299 frontend/…/ColorInput.vue• L93-159 frontend/…/ColorInput.vue• L199-260 frontend/…/ColorPickerContent.vue• L137-193 frontend/…/ColorPickerContent.vue• L297-321 frontend/…/GradientEditor.vue• L162-219 frontend/…/GradientEditor.vue• L277-350 frontend/…/BackgroundHandler.vue• L1 frontend/…/ShadowHandler.vue• L1
Transition controls
Transition controls define how selected visual changes animate. An author chooses a speed, timing curve, and property group. Choosing a speed supplies the basic transition settings, while clearing it removes the related transition behavior.
References: frontend/…/TransitionSection.ts• L5-89 frontend/…/StylePropertyControl.vue• L84-104
Responsive styles
Breakpoint overrides
Responsive editing lets an author set a base style and override it for tablet or mobile layouts. The canvas can show several device views, and the active breakpoint tells the inspector where the next style change belongs. A value that is not set at the active breakpoint can still appear through the cascade from a wider breakpoint.
The cascade moves from base to tablet to mobile. Clearing a local override exposes the next available value instead of forcing a new value. This lets authors refine a design at a narrow size while keeping the base design as the fallback. Controls show an inherited default as an outline rather than as a local selection, so the panel does not claim that the block stores a value it only receives from the cascade.
References: frontend/…/BuilderCanvas.vue• L43-87 frontend/…/BuilderCanvas.vue• L445-459 frontend/…/OptionToggle.vue• L41-63 frontend/…/block.ts• L236-257 frontend/…/block.ts• L393-497
Interaction states
Style controls can expose hover, active, and focus variants. These variants describe the style used when the rendered element is in that interaction state. They are separate from responsive breakpoints, so an author can define both a mobile value and a hover value for the same property. Selecting a variant previews that state on the canvas while the author edits it, and the preview ends when the author leaves the control or its open menu.
Adding an interaction variant can also establish a transition when needed. The editing state and history page covers how these edits become part of the builder's change and save flow.
References: frontend/…/StylePropertyControl.vue• L54-124 frontend/…/BasePropertyControl.vue• L59-87 frontend/…/VariantControl.vue• L1-141 frontend/…/block.ts• L258-260
Additional CSS properties
The More Styles section exposes valid CSS properties that do not already have a dedicated builder control. It reads styles active at the current breakpoint, includes inherited values for context, and lets an author add a property with a matching value control or an arbitrary value.
Dedicated controls take priority. Their properties do not appear in More Styles, which prevents two inspector paths from competing for the same setting. An author can remove an added property and its interaction-state values from the block.
References: frontend/…/MoreStylesPanel.vue• L88-147 frontend/…/MoreStylesPanel.vue• L188-215 frontend/…/stylePropertiesWithControls.ts• L23-47 frontend/…/cssMetadata.ts• L39-105
Attributes and specialized behavior
HTML attributes
The HTML Attributes section edits arbitrary attributes on the selected block. It supports dynamic values for attributes that must come from page or component data. Removing an attribute also removes its linked dynamic value so the authored block does not retain a hidden data binding.
Built-in controls use the same attribute path for common fields such as image sources, link destinations, input settings, and video playback flags. This keeps authored HTML behavior separate from CSS style state.
References: frontend/…/CustomAttributesSection.ts• L6-28 frontend/…/ObjectEditor.vue• L1-33 frontend/…/ObjectEditor.vue• L64-121 frontend/…/blockController.ts• L98-187
Accessibility options
Accessibility controls set the element tag, ARIA label, role, and tab order. They give an author a direct way to describe the purpose and keyboard behavior of a block without changing its visual style. The tag control can also change the semantic element used for the block.
References: frontend/…/AccessibilitySection.ts• L6-117 frontend/…/blockController.ts• L119-160
Input options
Input options define form behavior for input and textarea blocks. They set the input type and placeholder, then show radio-group name, submitted value, and checked state when the input is a radio control. The inspector uses the current type to keep dependent options relevant.
References: frontend/…/InputOptionsSection.ts• L6-112
Collection options
Collection options connect a repeater block to a collection key. The available keys come from page data, component data, or repeatable component properties, and the selected source is kept with the key. This connects block repetition to the data systems described in client-side code and data blocks.
References: frontend/…/CollectionOptionsSection.ts• L10-127 frontend/…/blockValueResolver.ts• L45-69
Data key options
Data key options bind a block value to a named data source. A normal block can set a key, type, and property. A repeater uses the key to select its collection and does not need the normal type and property fields.
References: frontend/…/DataKeySection.ts• L6-56 frontend/…/blockController.ts• L257-283
Visibility options
Visibility options attach a condition to a block. The condition uses a boolean value from a supported data source and is evaluated in preview mode. This allows authored pages to show or hide content without removing it from the block tree.
References: frontend/…/OptionsSection.ts• L26-45 frontend/…/VisibilityInput.vue• L40-96 frontend/…/blockController.ts• L119-151
Editor configuration
Editor configuration changes how a fragment appears inside the builder rather than how it behaves on the public page. In developer mode, fragment authors can choose a layer icon and whether the editor shows the fragment's children. This section is hidden for normal page editing.
References: frontend/…/EditorConfigSection.ts• L8-64 frontend/…/block.ts• L501-524
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the property registry and the More Styles exclusion set aligned. A new dedicated style control must not also appear as an unowned CSS property.
- Keep the active-breakpoint read path aligned with the style write path. A control that reads inherited values must still write only the intended local override.
- Keep shorthand spacing controls aligned with their side-value conversion rules so an edit does not silently discard existing sides. Preserve the mixed and split states when several blocks or sides differ.
- Keep dynamic-value cleanup aligned with attribute and property removal. A deleted field must not retain a stale binding.
- Keep dynamic source lists aligned with the current block scope. Repeater data, component data, passed-down props, and page data must not be shown or resolved under the wrong context.
- Keep specialized controls conditional on the same block type rules used by block conversion. A control that can create or remove structure must not leave an invalid block state.
- Keep color and gradient picker values grouped with the editor history contract. A drag should not create an unusable stream of separate undo steps, and a recently used value should represent an applied value rather than an untouched default.
- Keep autocomplete display labels separate from stored values. Named color tokens and other options can show a readable label while selection and arbitrary-value entry still use the underlying value.
- Keep autocomplete keyboard state tied to the current search. After typing changes the query, Enter must submit the typed value or its matching option rather than an old highlighted result. After arrow navigation, Enter must commit the highlighted option.
- Keep image upload and removal events mapped to the image source control. Replacing an image must update the selected block's source, while removal must clear it rather than leave the old asset active.
- Keep image focus and view-box updates in the same coordinate model as the rendered crop. A focal-point edit and a zoom-crop edit must not drift apart on the canvas.
- Keep code editor save, blur, dirty, search, completion, and parse rules aligned with the value type. Invalid structured text must not be written as if it were a valid block, page, or component value, and read-only values must not expose save or replace actions.
- Keep code search state tied to the active editor. Match-case, whole-word, regular-expression, navigation, selection, and replacement actions must update the same search query that the editor displays.
- Keep block search replacement support aligned with its search filters. Tag and data filters can locate blocks but do not provide replacement, while the result limit means a bulk replacement only covers displayed results.
- Keep numeric input updates aligned with the stepper and clear actions. A field must not show an affordance that its value type or current width cannot safely support.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A dedicated CSS property is not registered as an owned control | The same style appears in More Styles and can be edited through two competing paths | Derive the exclusion set from the full property registry and its declared style properties |
| A responsive control reads the cascade but writes to the wrong breakpoint | A narrow-screen change changes the base design or appears to have no effect | Use the active canvas breakpoint for writes and cascading lookup only for the displayed fallback |
| A spacing shorthand is updated without clearing or rebuilding its side values | One side can override the new shorthand and make the canvas differ from the inspector | Use the shared spacing conversion and update path |
| A custom attribute is renamed or deleted without moving its dynamic binding | The rendered attribute can point to old data or retain an invisible binding | Migrate or remove the matching attribute dynamic value with the key change |
| A link destination is cleared while link structure remains | A block can keep link behavior with no valid destination | Use the link conversion and unset path when the destination changes |
| A visibility condition is treated as live canvas state | The editor can hide content while the author is trying to edit it | Evaluate the condition in preview mode as the control describes |
| Typed color input is accepted without validation | An invalid value can replace a valid style or leave the picker unable to resolve the color | Normalize supported color forms and restore the last valid value after invalid input |
| A picker drag creates one history entry per pointer move | Undo becomes slow and removes only part of one visual edit | Pause history during the drag and resume it when the pointer is released |
| A gradient is changed from linear to radial without resetting its angle | The saved gradient can contain a value that is not valid for its new type | Convert the angle to a valid radial or linear form when the type changes |
| An autocomplete uses a display label as its stored value | A token or option can look correct but write the wrong CSS or data value | Keep display labels separate from model values and resolve arbitrary input on commit |
| Enter commits a stale highlighted option after the author types a new query | The control writes an option that the author did not choose instead of the typed value | Reset arrow-navigation state on query changes and commit a highlighted item only after explicit arrow navigation |
| An image upload or removal event is not passed to the selected block | The control can show a new image or an empty state while the authored source stays unchanged | Route upload to the source update and removal to an explicit source clear |
| A focal point and crop window use different image coordinates | The inspector shows one crop while the rendered image uses another | Use the rendered image bounds and the same view-box window for both updates |
| Invalid structured text is committed by the code editor | A block, page, or component value can become unusable or fail to update | Parse structured values at the commit boundary and keep the prior value when parsing fails |
| A split spacing input merges unequal sides when switching modes | A side-specific layout change is lost and the canvas changes unexpectedly | Show split mode for unequal values and merge only on an explicit uniform-mode change |
| A read-only code editor exposes save or replace actions | An author can appear to edit a value that cannot be saved | Pass the read-only state to the editor and search panel and disable write actions |
| A code editor search option changes without rebuilding its query | Find or replace returns unexpected results for case, word, or regular-expression searches | Rebuild the editor search query when the term or match option changes |
| A block search result matches only a tag or data key | Replace reports no change even though the block appears in the result list | Treat tag and data as locate-only filters or explain their non-replaceable state |
| A bulk block replacement reaches the result limit | Blocks after the first 50 matches keep the old value | Show or honor the result limit before treating bulk replacement as complete |
| A numeric field emits one uncontrolled update path while its stepper or clear action uses another | The visible input and selected block can disagree after a quick edit | Route typed, stepped, and cleared values through the same model update contract |
Key files
| File | Why to read it |
|---|---|
| frontend/…/BlockProperties.vue | Entry point for selection-aware inspector rendering, search, and conditional sections |
| frontend/…/index.ts | Registry that defines the inspector's high-level section order and ownership model |
| frontend/…/blockController.ts | Shared boundary between controls, selected blocks, styles, attributes, props, and content values |
| frontend/…/block.ts | Block-level style storage, breakpoint cascade, attributes, and block type behavior |
| frontend/…/BasePropertyControl.vue | Common control behavior for values, units, variants, defaults, sliders, and dynamic sources |
| frontend/…/PropertyControlInput.vue | Shared input boundary that overlays and clears dynamic values without changing the underlying control type |
| frontend/…/DynamicValueHandler.vue | Source picker for page data, component data, repeater scope, and block or component properties |
| frontend/…/PropertyLabel.vue | Shared property label affordances for variants, dynamic values, and numeric label dragging |
| frontend/…/VariantControl.vue | Responsive and interaction-state value rows with explicit clearing of local variants |
| frontend/…/Autocomplete.vue | Searchable option control with async options, arbitrary values, numeric arrows, label and value separation, and keyboard selection |
| frontend/…/NumberArrows.vue | Numeric stepper behavior for single changes and held-button repetition |
| frontend/…/InlineInput.vue | Compact text and autocomplete control with unit normalization, slider input, and keyboard stepping |
| frontend/…/Input.vue | Shared text, select, checkbox, clear, debounce, overflow, and numeric-stepper input behavior |
| frontend/…/SplitModeInput.vue | Uniform-versus-side-specific editing for values such as spacing shorthands |
| frontend/…/SplitInput.vue | Side value conversion, normalization, keyboard adjustment, and label dragging |
| frontend/…/ColorInput.vue | Color field that validates typed values and connects CSS tokens to the picker |
| frontend/…/ColorPickerContent.vue | Color selection, alpha control, eyedropper support, and shared recent color swatches |
| frontend/…/GradientEditor.vue | Linear and radial gradient editing with stops, presets, and recent gradients |
| frontend/…/ImageFocusInput.vue | Focal-point placement and optional zoom-crop editing for image content |
| frontend/…/ImageUploader.vue | Shared upload control for adding, replacing, and removing image sources |
| frontend/…/CodeEditor.vue | Code and structured-value editing with parse, dirty, blur, and explicit-save behavior |
| frontend/…/CodeMirrorEditor.vue | Language editor setup, context-aware completion, read-only mode, theme, lifecycle, and search integration |
| frontend/…/CustomSearchPanel.vue | Find and replace controls for code values with match modes, navigation, and selection actions |
| frontend/…/SearchBlock.vue | Block-tree search and replacement across content, styles, attributes, classes, tags, and data links |
| frontend/…/MoreStylesPanel.vue | Fallback path for CSS properties without a dedicated inspector control |
| frontend/…/StandardPropsInputSection.ts | Mapping from component-declared options to author-facing property controls |
| frontend/…/LayoutSection.ts | Container layout choices and flex or grid-specific controls |
| frontend/…/SpacingSection.ts | Margin, padding, and gap editing model |
| frontend/…/TypographySection.ts | Text content and typography controls |
| frontend/…/StyleSection.ts | General surface, border, shadow, overflow, and transform controls |
| frontend/…/CustomAttributesSection.ts | Arbitrary HTML attribute editing and dynamic attribute entry point |
| frontend/…/CollectionOptionsSection.ts | Repeater collection selection across page, component, and property data |