Mobile Overrides
Override any tool property for mobile devices without changing the desktop version. Pexelize uses a _override.mobile pattern in the design JSON so each content block, column, or row can look different on phones.
How it works
Every element in the design JSON has a values object. Desktop values are set directly. Mobile-specific values go inside values._override.mobile:
{
"type": "heading",
"values": {
"fontSize": "32px",
"textAlign": "center",
"containerPadding": "20px",
"_override": {
"mobile": {
"fontSize": "20px",
"textAlign": "left",
"containerPadding": "10px"
}
}
}
}
On screens wider than 480px, the heading renders at 32px, centered. On mobile (480px and below), it renders at 20px, left-aligned, with tighter padding.
Properties not listed in _override.mobile inherit the desktop value. You only need to specify what changes.
Visibility: hide on mobile or desktop
Use hideDesktop and hideMobile booleans directly on any row or content block to show or hide it by device:
{
"type": "image",
"values": {
"src": { "url": "https://example.com/banner.png" },
"hideDesktop": false,
"hideMobile": true
}
}
This image appears on desktop but is hidden on mobile. Useful for:
- Showing a compact mobile-only layout alongside a full desktop layout
- Hiding large images on mobile to improve load time
- Displaying different CTAs per device
Row mobile properties
Column stacking
By default, columns stack vertically on mobile. Control this with row-level properties:
{
"cells": [1, 1],
"values": {
"noStackMobile": false,
"stackOrder": "ltr",
"hideDesktop": false,
"hideMobile": false,
"_override": {
"mobile": {
"backgroundColor": "#f0f0f0",
"padding": "10px"
}
}
}
}
| Property | Type | Default | Description |
|---|---|---|---|
noStackMobile | boolean | false | Set true to keep columns side-by-side on mobile |
stackOrder | "ltr" | "rtl" | "ltr" | Column stacking order. "rtl" reverses the order on mobile |
hideDesktop | boolean | false | Hide this row on desktop |
hideMobile | boolean | false | Hide this row on mobile |
Row _override.mobile properties
| Property | Type | Description |
|---|---|---|
backgroundColor | string | Row background color |
columnsBackgroundColor | string | Content area background |
padding | string | Row padding (e.g. "10px") |
border | Border | Content area border |
borderRadius | string | Content area border radius |
backgroundImage | BackgroundImage | Row background image |
Column mobile overrides
{
"values": {
"backgroundColor": "#ffffff",
"padding": "20px",
"_override": {
"mobile": {
"backgroundColor": "#f8f8f8",
"padding": "10px"
}
}
}
}
| Property | Type | Description |
|---|---|---|
backgroundColor | string | Column background color |
padding | string | Column padding |
border | Border | Column border |
borderRadius | string | Column border radius |
backgroundImage | BackgroundImage | Column background image |
Content block overrides by tool
Text / Paragraph / Heading
{
"type": "heading",
"values": {
"text": "<h1>Welcome</h1>",
"fontSize": "36px",
"lineHeight": "140%",
"_override": {
"mobile": {
"fontSize": "24px",
"lineHeight": "130%",
"textAlign": "left",
"letterSpacing": "normal"
}
}
}
}
| Property | Type | Description |
|---|---|---|
fontSize | string | Font size (e.g. "24px") |
fontWeight | string | Font weight (e.g. "700") |
lineHeight | string | Line height (e.g. "140%") |
letterSpacing | string | Letter spacing |
color | string | Text color |
textAlign | string | "left" | "center" | "right" |
containerPadding | string | Outer padding around the block |
linkStyle | LinkStyle | Link color, underline, hover styles |
Button
{
"type": "button",
"values": {
"text": "Get Started",
"fontSize": "16px",
"padding": "12px 24px",
"buttonColors": {
"color": "#ffffff",
"backgroundColor": "#1d4ed8"
},
"_override": {
"mobile": {
"fontSize": "14px",
"padding": "10px 20px",
"size": { "width": "100%", "autoWidth": false },
"buttonAlign": "center"
}
}
}
}
| Property | Type | Description |
|---|---|---|
fontSize | string | Button text font size |
fontWeight | string | Button text font weight |
lineHeight | string | Button text line height |
padding | string | Button inner padding |
border | Border | Button border |
borderRadius | string | Button border radius |
size | { width, autoWidth } | Button width. Set autoWidth: false with width: "100%" for full-width mobile buttons |
buttonAlign | string | Button alignment |
textAlign | string | Button text alignment |
buttonColors.color | string | Button text color |
buttonColors.backgroundColor | string | Button background color |
buttonColors.hoverColor | string | Hover text color |
buttonColors.hoverBackgroundColor | string | Hover background color |
containerPadding | string | Outer padding |
Image
{
"type": "image",
"values": {
"src": { "url": "https://example.com/hero.png", "width": 600 },
"_override": {
"mobile": {
"size": { "width": "100%", "autoWidth": false }
}
}
}
}
| Property | Type | Description |
|---|---|---|
size | { width, autoWidth } | Image size on mobile |
containerPadding | string | Outer padding |
Divider
| Property | Type | Description |
|---|---|---|
width | string | Divider width (e.g. "80%") |
border | Border | Divider line style, width, and color |
containerPadding | string | Outer padding |
Spacer
{
"type": "spacer",
"values": {
"height": "40px",
"_override": {
"mobile": {
"height": "20px"
}
}
}
}
| Property | Type | Description |
|---|---|---|
height | string | Spacer height on mobile |
Menu
| Property | Type | Description |
|---|---|---|
align | string | Menu alignment |
layout | string | "horizontal" or "vertical". Switch to vertical on mobile for better tap targets |
containerPadding | string | Outer padding |
Social Icons
| Property | Type | Description |
|---|---|---|
align | string | Icon alignment |
spacing | number | Spacing between icons (px) |
iconSize | number | Icon size (px) |
containerPadding | string | Outer padding |
Table
Tables have an extended set of mobile overrides for header and content cells:
| Property | Type | Description |
|---|---|---|
headerBackgroundColor | string | Header row background |
headerColor | string | Header text color |
headerFontSize | string | Header font size |
headerFontWeight | number | Header font weight |
headerTextAlign | string | Header text alignment |
contentFontSize | string | Cell font size |
contentFontWeight | number | Cell font weight |
contentColor | string | Cell text color |
contentTextAlign | string | Cell text alignment |
contentLineHeight | string | Cell line height |
contentLetterSpacing | string | Cell letter spacing |
backgroundColor | string | Table background |
containerPadding | string | Outer padding |
Setting overrides via SDK
You can load a design with mobile overrides already set, or let users configure them in the editor's mobile view mode.
- React
- Vanilla JS
// Load a design with mobile overrides pre-configured
const design = {
body: {
rows: [{
cells: [1],
values: {
noStackMobile: false,
hideDesktop: false,
hideMobile: false,
},
columns: [{
values: { padding: '20px' },
contents: [{
type: 'heading',
values: {
text: '<h1>Hello</h1>',
fontSize: '36px',
_override: {
mobile: {
fontSize: '22px',
containerPadding: '10px',
},
},
},
}],
}],
}],
},
};
editorRef.current?.editor?.loadDesign(design);
const design = {
body: {
rows: [{
cells: [1],
values: {
noStackMobile: false,
hideDesktop: false,
hideMobile: false,
},
columns: [{
values: { padding: '20px' },
contents: [{
type: 'heading',
values: {
text: '<h1>Hello</h1>',
fontSize: '36px',
_override: {
mobile: {
fontSize: '22px',
containerPadding: '10px',
},
},
},
}],
}],
}],
},
};
pexelize.loadDesign(design);
Mobile overrides apply at 480px and below. This breakpoint is standard for email clients and matches how most email rendering engines handle responsive layouts.
Mobile overrides only take effect when the responsiveDesign feature is enabled in your plan and configuration. Without it, the editor shows only the desktop view and mobile overrides in the JSON are ignored during editing (but still rendered in exported HTML).
Next steps
- Configure Tools -- enable, disable, and set default values for tools
- Design JSON -- full design JSON structure reference
- Export HTML -- mobile overrides are included in the responsive HTML output