The Visual Editor
Everything after the AI build happens here: typography, color, layout, icons, custom CSS, responsive tuning, drag-and-drop. All of it free.
The basics
The Visual Editor activates automatically once a build finishes. On existing pages, click Edit with LHAI (from the page list or the front-end admin bar) and the builder opens with the page loaded.
Selecting elements
- Hover outlines the element under your cursor.
- Click selects it — the properties sidebar on the right shows its current styles.
- Click inside a selected section drills into the child element (heading, paragraph, button).
- Right-click opens a context menu: duplicate, delete, move up/down, copy style, paste style.
- Esc deselects and closes the sidebar.
Keyboard shortcuts
| Keys | Action |
|---|---|
| Ctrl + Z | Undo (50-entry stack) |
| Ctrl + Shift + Z | Redo |
| Esc | Deselect |
| Esc Esc | Emergency reset — clears any stuck overlay |
| Delete | Delete the selected element |
Typography
The Typography accordion controls fontFamily, fontSize, fontWeight, lineHeight, textAlign, and color. The font picker pulls from Google Fonts plus system fallbacks. Changes apply live to the selected element only.
Background
The Background accordion is a tabbed control — Color, Gradient, or Image. Pick one mode per element; the active tab is what gets written to the element's background.
Color
Flat background-color. Includes a "Clear" button that removes the property entirely so the element reverts to whatever the parent or theme defines.
Gradient
Linear or radial. For linear, drag the angle slider (0–360°). The stops list starts with two stops and adds more via the + Add stop button; each stop has its own color picker and position percentage. Minimum two stops (CSS requirement); the × button hides when you'd break that minimum.
/* Example output */
background-image: linear-gradient(135deg, #faf5ff 0%, #ddd6fe 50%, #5a4fcf 100%);
Image
Two ways in:
- Upload opens the WordPress media library (
wp.media). - Generate with AI describes the current section to the image engine and paints a background. 10 credits
Position, size, and repeat are standard CSS dropdowns. The Overlay block stacks a semi-transparent color above the image — useful for making white text readable on busy photographs.
Spacing, border, effects, layout
Four more accordions sit below Background:
- Spacing — box-model editor for margin and padding (T/R/B/L), with a link button that forces all four sides equal.
- Border — width, color, radius, style.
- Effects — opacity slider; box-shadow toggle that exposes X/Y/blur/spread/color when enabled.
- Layout — display (block / flex / grid / inline / none), width, height, max-width, overflow.
Advanced — Custom CSS
When you need something the GUI doesn't cover, open Advanced → Custom CSS. Use the literal token selector as a placeholder; LHAI rewrites it to a scoped attribute selector so your rule only affects this one element.
selector {
box-shadow: 0 20px 60px -20px rgba(90, 79, 207, 0.4);
transform: rotate(-1deg);
transition: transform 0.3s ease;
}
selector:hover {
transform: rotate(0deg) scale(1.02);
}
Behind the scenes LHAI assigns the element a stable data-lhai-el="…" attribute and rewrites selector to [data-lhai-el="…"]. Your CSS is stored in a single <style> block inside the page, so it ships with the published HTML.
Copy & paste styles
Right-click an element whose look you like and choose Copy style. Right-click another element and Paste style — every style property transfers at once. Great for aligning headings across sections.
Responsive toggles
The toolbar has three viewport buttons: desktop (1200px), tablet (768px), mobile (375px). Switching doesn't change the output HTML — it only changes the preview frame size so you can verify behavior. Your CSS still has to be responsive (flex, media queries, etc.); the previewer doesn't magic that in.
Icons
When you select an icon (<svg>, <i>, or a thin wrapper around an SVG), an Icon section appears at the top of the sidebar with a Change icon… button. It opens a 120-plus Lucide library searchable by name or category.
Drag & drop
Hover any section and a drag handle appears on its left edge. Grab it to reorder sections. Inside a section, individual children can also be reordered (useful for rearranging cards in a grid).
Undo & safety nets
LHAI keeps 50 undo entries per session. Typing bursts (e.g., dragging a slider) are coalesced into a single entry so Ctrl+Z feels natural.
window.LhaiBuilder.emergencyReset(); the page state is preserved, only the UI chrome is nuked and rebuilt.