Skip to content
Block Controls

Controls

Controls let users customize blocks by managing block attributes in the block editor. Each control handles a different kind of data, from a text input to a file uploader or a repeater. When the block renders, you can access these values to output them in your block.

Adding Controls

Add controls to your block using the "Add Control" button in the block builder. You can add multiple controls to manage different aspects of your block.

Adding a new control in Lazy Blocks

Control Settings

Each control has a set of common settings that determine how it works and displays:

Control settings panel

Basic Settings

  • Label (label) - the name shown in the block editor
  • Name (name) - unique identifier for reading the control's value in code
  • Type (type) - the kind of control, text for a new one
  • Default value (default) - the value a newly inserted block starts with

Display Settings

  • Placement (placement) - where the control appears, content by default, and the other options are Inspector and Both
  • Width (width) - width in the Content area, 100 by default, and the other options are 25, 50 and 75
  • Help text (help) - text shown under the control

Advanced Settings

  • Required (required) - off by default. Blocks publishing while the control is empty
  • Hide if block is not selected (hide_if_not_selected) - off by default. Shows the control only while the block is selected
  • WPML Translation (translate) - off by default, and offered only on the eight controls that store text. Learn more here
  • Save in Meta (save_in_meta) - off by default. Stores the value in a post meta field instead of on the block
  • Conditional Logic (conditional_logic) - shows or hides the control by rules on other controls

Control Placement

Block control placement

Controls can be placed in 2 locations: Inspector and Content (inside block body). However, we recommend using the Inspector for your controls to follow WordPress best practices. Native WordPress blocks use the Inspector panel for all controls, while the Content area is reserved for rendering the actual block output.

When you add controls to the Content area, Lazy Blocks will automatically add a frame border and title to your block to distinguish it from regular content. This visual change helps users understand that the block contains editable controls.

Block control placement

Inspector Groups

A control placed in the Inspector belongs to one of five groups. The Group row is only shown when Placement is Inspector or Both, so a control sitting in the Content area has no group at all.

GroupStored valueWhere the control appears
SettingssettingsSettings tab
ContentcontentContent tab
List ViewlistList View tab
StylesstylesStyles tab
AdvancedadvancedAdvanced panel at the bottom of the Settings tab

The first four are WordPress's own inspector tabs, and a tab only appears when a block has something to put in it. A control lands in the same place a core block's control would.

A new control starts in Settings. Content and List View were added in 4.3.0.

Controls saved before that store default, which the builder reads as settings. Default is a legacy value, not a label you can pick today.

Custom Meta Field

Block control custom meta field

Each control has the possibility to save its value in the custom fields, so this value will be available in the post meta data and developers may get this value. For example:

<p><?php echo get_lzb_meta( 'control_meta_name' ); ?></p>

You should add a unique custom field name, as 3rd-party plugins/themes may use the same name and it will be conflicted. For example, if you want to use this block in your theme "My Super Theme", we recommend adding a slug prefix to the name, such as mst_control_meta_name.

Reserved Control Names

These six names are already block attributes. A control given one of them is overwritten, and the block's own value takes its place:

NameDescription
lazyblockinternal block data used by Lazy Blocks plugin
classNameblock custom classname
alignblock align, registered by the Align support
anchorblock custom ID
blockIdblock unique ID, generates automatically
blockUniqueClassblock unique class, generates automatically

Ghost Kit support adds two more, ghostkitSpacings and ghostkitSR. A Rich Text component named after any of these eight stores nothing, so <RichText name="ghostkitSR" /> never gets a value.

The builder does not check the list. The Name field rejects characters outside A-Z a-z 0-9 - _ and nothing more, and even that error leaves the block saveable. Treat the table as advice.

All Controls

Basic

Email Control
Email
Number Control
Number
Password Control
Password
Range Control
Range
Text Control
Text
Textarea Control
Textarea
URL Control
URL

Content

Classic Editor Control
Classic Editor
Code Editor Control
Code Editor
File Control
File
Gallery Control
Gallery
Image Control
Image
Rich Text Control
Rich Text

Choice

Checkbox Control
Checkbox
Radio Control
Radio
Select Control
Select
Toggle Control
Toggle
Token Field Control
Token Field

Advanced

Color Picker Control
Color Picker
Date Time Picker Control
Date Time Picker
Posts Control
Posts
Taxonomy Control
Taxonomy
Units Control
Units
Users Control
Users
Link Control
Link

Layout

Divider Control
Divider
Message Control
Message
Panel Control
Panel
Repeater Control
Repeater

Was this article helpful?

Copyright © 2026 Lazy Blocks.