Docs / Visual Editor

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

Keyboard shortcuts

KeysAction
Ctrl + ZUndo (50-entry stack)
Ctrl + Shift + ZRedo
EscDeselect
Esc EscEmergency reset — clears any stuck overlay
DeleteDelete 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:

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:

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.

If the builder ever locks up — no clicks working, overlay stuck — press Esc twice. That clears orphaned overlays. If that fails, open the browser console and run window.LhaiBuilder.emergencyReset(); the page state is preserved, only the UI chrome is nuked and rebuilt.