Free cookie consent management tool by TermsFeed Generator
All Products & Integrations

jalpi page builder docs

Advanced Controls

The inspector control primitives, which data path each one writes, and the responsive editing model.

Jalpi CoreDeveloper
4 min read Β· November 2026

Every inspector field is one of a small set of primitives defined in PropertiesPanel.tsx. This page names them and, more importantly, states exactly where each writes β€” content, settings or styles β€” because that determines which sanitizer branch validates it.

Layout primitives#

ComponentRole
PropGroupCollapsible accordion group with an optional icon and β€œinherited from class” badge
PropRowOne label + control row; responsive adds the per-breakpoint indicator, stack puts the control below the label
AccordionScopeControls which group opens first, keyed by node type and tab
NormalHoverTabsNormal / Hover state switch, used by colour, background and border groups
DeviceBannerThe β€œEditing Tablet/Mobile β€” overrides only” banner
GenericStyleExtrasRenders schema-widget fields marked tab: 'style' at the top of the Style tab

Input primitives#

ComponentValueTypical use
TextInputstringFree text, z-index, box-shadow shorthand
Selectone keyEnumerations
AlignButtonsleft / center / right / justifyText alignment
ColorInputcolour stringSwatch plus text field
ColorPropRowcolour stringColorInput in a row, with a Design System link control
DimensionInputvalue + unitAny length; the unit list is per-control
SliderDimInputvalue + unitRange track plus a numeric box and unit switch
SliderPropRowvalue + unitSliderDimInput in a responsive row
PopupSliderFieldnumberSlider inside a popup
BoxSpacingControlfour sidesMargin, padding, border width, border radius; supports link-all
StarRatingInputintegerStar Rating widget
MediaPickerInput / ImageUploadInputattachment URLOpens wp.media
IconInput + IconPickerModalIconValueFont Awesome, Bootstrap, Tabler, Material and built-in SVGs, with search and favourites
DynamicTagPicker{{tag}} textInserts a dynamic tag into a text or URL field
TokenLinkControlglobalStyleRef.tokens[prop]Links one property to a Design System token
ClassPickersettings.cssClassesAttach and detach reusable classes
SectionBgEditorBgDataClassic / gradient / video / slideshow background editor
ImgBoxShadowPopup / TextShadowPopupcomposite partsShadow builders
TypographyTriggerRow + TypographyPopupmultiple style keysFamily, size, weight, line height, letter spacing, transform, decoration
AnimationPresetPickeran interaction ruleBrowse the animation library
InteractionRuleEditorone InteractionRuleTrigger, action, settings and per-breakpoint toggles

Which control writes where#

Inspector tabStore actionData pathValidated by
ContentupdateNodeContentnode.content.*sanitize_content() β€” a case per type
Style (desktop)updateNodeStylesnode.styles.*sanitize_styles() β€” a fixed allow-list
Style (tablet / mobile)updateNode({ tabletStyles })node.tabletStyles.* / node.mobileStyles.*sanitize_styles()
Advanced / SettingsupdateNodeSettings or updateNodenode.settings.*sanitize_settings() β€” shared keys plus a case per type
Animation β†’ InteractionaddInteraction / updateInteractionnode.interactions[]sanitize_interactions()
Animation β†’ SplitupdateNode({ settings })node.settings.st_*sanitize_settings() shared branch
VisibilityupdateNodeHideOnnode.hideOnsanitize_node()
Token linklinkNodeToken / unlinkNodeTokennode.globalStyleRef.tokenssanitize_global_style_ref_data()
Class attachaddClassToNode / removeClassFromNodenode.settings.cssClassessanitize_settings() β€” capped at 50 keys

Responsive editing#

Switching the breakpoint in the top bar changes which map the Style tab writes to. The tab computes an effective style map for display:

const styles = respKey
  ? { ...(node.styles ?? {}), ...Object.fromEntries(
        Object.entries(respStyles).filter(([, v]) => v != null && v !== '')) }
  : (node.styles ?? {});

So a field shows the desktop value until you type something, and an empty override means β€œinherit desktop”. On the server, maybe_add_responsive_rules() emits only the properties actually present in tabletStyles / mobileStyles, inside the configured media query β€” nothing is back-filled.

The Advanced tab shows a reduced set on tablet and mobile: Margin, Padding, Responsive Size, Responsive Typography, and Order & Display.

Style keys that do not persist#

Jalpi_Sanitizer::sanitize_styles() is an allow-list: a key that is neither in $color_keys, nor in $dim_keys, nor matched by its switch is dropped. Several controls write keys outside that list, so their values do not survive a save.

ControlKey writtenIn styles_to_css()?In sanitize_styles()?
Advanced β†’ Position β†’ ModepositionYesNo
Advanced β†’ Position β†’ Top/Right/Bottom/Lefttop, right, bottom, leftYesNo
Advanced β†’ Position β†’ Z-IndexzIndexYesNo
Advanced β†’ Order & Display β†’ OrderorderNoNo
Style β†’ Link ColorlinkColor, linkColorHoverRead by the Heading and Text elementsNo
Style β†’ Paragraph SpacingparagraphSpacingRead by the Heading and Text elementsNo

The corresponding settings.position / posTop / posRight / posBottom / posLeft keys declared in SectionSettings and ContainerSettings are likewise absent from sanitize_settings() and from every PHP file.

The practical effect: these controls update the canvas immediately (the editor applies them client-side), but the value is not in the response of the next page load. Positioning that must persist should be expressed through per-element Custom CSS, which is sanitised and emitted:

selector { position: absolute; top: 24px; right: 24px; z-index: 5; }

Important

  • The Position, Z-Index, Order, Link Color and Paragraph Spacing controls write style keys that sanitize_styles() does not accept, so their values are lost on save. Use per-element Custom CSS for these until the allow-list is extended.
Source

Files

admin/editor/src/components/panels/PropertiesPanel.tsx includes/class-jalpi-sanitizer.php includes/class-jalpi-renderer.php admin/editor/src/components/panels/IconPickerModal.tsx admin/editor/src/components/panels/DynamicTagPicker.tsx

Classes

Jalpi_Sanitizer Jalpi_Renderer

Functions

sanitize_styles sanitize_settings sanitize_content styles_to_css maybe_add_responsive_rules