Features/Components

Lock

Lock an element or component instance so its inner elements cannot be selected or changed by accident on the canvas.

Lock protects a finished part of the design. A locked element still renders normally, but on the canvas its children ignore clicks and touches, and in the Layers panel it shows as a single closed row. You can lock any element from its context menu (Lock / Unlock) and lock a component instance from the Content panel (Lock Yes/No). Use it on navbars, footers or complex sections that clients or teammates should not break while editing nearby content.

How it works

  • Stored in tag properties.lock (action put/tags/properties/lock), with undo/redo.
  • Canvas: a locked tag gets the attribute dh-lock; CSS 'main [dh-lock] * { pointer-events: none; touch-action: none }' makes its descendants unclickable.
  • Layers: a locked tag renders as a closed row without children; for an instance, the inner tree is not expanded.
  • Instances of components with variables (widgets) are always rendered with dh-lock, so their inner nodes are edited through the content form.
  • Lock has no effect on the published site.

When to use it

  • Protect a navbar instance while editing the hero
  • Hand a site to a client editor without risk of breaking a complex section

Limitations

  • Lock is an editor aid, not a permission: anyone who can edit can unlock.
  • The locked element itself can still be selected; only its children are blocked.

Availability

  • Works in Designer.
  • Included in every plan.

How to use it.

  1. Right click an element on the canvas or in Layers.
  2. Choose Lock (or Unlock to release it).
  3. For an instance you can also use Content > Component > Lock.

Questions.

Does lock change the live site?

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.