HTML Builder

HTML Builder: Widgets and Structure

7 min read

Notifal 3.0.0 adds a Widgets palette and drag-and-drop organization to the HTML Builder. Widgets insert useful HTML quickly, while Structure remains the complete element tree for your template.

Widgets do not lock your design into a separate format. The saved template is still normal HTML, and you can keep using View HTML or the selected element's HTML tab whenever you need full control.

New to the builder? Start with Creating a Template with the HTML Builder.

Structure and Widgets tabs

The left panel has two tabs:

TabPurpose
StructureView, select, reorder, nest, duplicate, copy, or remove every editable HTML element
WidgetsInsert ready-made HTML elements and Notifal features

When Notifal recognizes widget HTML, its Structure row shows a small widget badge. Regular HTML without a widget badge remains fully supported.

Built-in widgets

CategoryWidgetPurpose
BasicHeadingAdd an editable h2 headline
BasicParagraphAdd editable body copy
BasicListAdd a three-item benefit or steps list
MediaImageAdd a static image, then choose its URL or use Media Library
MediaFeatured ImageAdd the dynamic featured image for the current product, post, or page
ActionsButtonAdd a tracked Notifal action button
ActionsClose ButtonAdd a control that dismisses the notification
ActionsCountdownAdd a Notifal countdown (evergreen, due date, or product sale date)
ActionsFormAdd a Notifal Forms lead form with data attributes
LayoutDividerAdd a horizontal divider
LayoutSpacerAdd adjustable vertical space

For button behavior and tracking, see HTML Builder: Buttons, Close Icon, and Click Tracking. For Forms fields, steps, and settings, see the Forms documentation.

Insert a widget with one click

  1. Open Structure and select the container that should receive the widget.
  2. Open Widgets.
  3. Click the widget you want.

The widget is inserted inside the selected element. If the template is empty, Notifal creates the initial document structure and inserts the widget into it.

Tip: Select the notification's main wrapper before clicking a widget. Selecting a paragraph or image may place the new widget in an unexpected location.

Drag a widget to an exact location

Drag a widget from the palette onto a row in the compact Structure tree.

The row is divided into three drop areas:

Pointer positionResult
Top edgeInsert before the target
MiddleInsert inside the target
Bottom edgeInsert after the target

A purple line shows before or after placement. When nesting inside a container, the target receives a highlighted outline and an Inside label.

Elements such as img, hr, and input cannot contain children. For these elements, Notifal offers before or after placement instead.

Reorder or nest existing elements

You can also drag rows directly in Structure:

  1. Drag the row for the element you want to move.
  2. Hover over another row.
  3. Use the insertion line for before or after, or the highlighted middle area for inside.
  4. Release to move the element.

The selected element stays selected after the move. Notifal prevents moving an element into itself or one of its own descendants.

Right-click menu (Structure)

Right-click a Structure row to open the context menu:

ActionWhat it does
CopyCopy the element's HTML fragment
PastePaste the copied element as the first child inside the target (disabled until you copy)
Copy stylesCopy inline styles from the element and its descendants
Paste stylesApply copied styles onto the target (disabled until you copy styles)
DuplicateInsert a copy of the element next to the original
RemoveDelete the element

Keyboard remove

  • Select the Structure row and press Delete or Backspace.
  • Delete and Backspace do not remove an element while you are typing in an input, textarea, or other editable field.

Edit widget settings

Select a widget in Structure or on the canvas, then use the right panel.

Widget or elementUseful controls
Heading, paragraph, listContent text and Typography styles
ImageImage URL or Media Library, size, and object fit
Featured ImageDynamic image size and border radius
ButtonLabel, action type (copy, Ajax add to cart, custom trigger, and more), typography, background, spacing, and size
Close ButtonClose control content and styles
CountdownType, duration or due date, visible units, labels, completion behavior, gap, alignment, and radius
FormForm CPT connection, multi-step, success message/redirect, captcha mode
Form fieldField name/type, required, unique, regex, conditionals
SpacerHeight
Layout containersFlex direction, alignment, gap, wrapping, and Items

If an element uses a CSS gradient, choosing Background Color replaces that gradient with a solid color. Notifal shows a note before making this change.

Countdown types

Select a countdown widget, then open Content.

TypeHow the timer runs
Evergreen timerDuration you set (days, hours, minutes, seconds). Starts when the notification is shown.
Due dateCounts down to a date and time in the site timezone.
Product sale dateUses the product sale end date when the notification has a product.

You can show or hide units and set custom labels. When the timer ends, choose Keep showing 00:00, Hide the timer, or Close the notification.

Forms in the builder

Insert a Form widget, or ask Noti to add a lead form.

  • Connect an existing Form, or use Create & connect.
  • When Noti generates a form, it can create the Form CPT and bind data-form-id automatically.
  • Emails and integrations stay on Notifal → Forms. Design stays on the canvas.

Widgets and custom HTML work together

Widgets are shortcuts, not restrictions:

  • You may edit widget markup in the HTML tab.
  • You may paste or write any allowed custom HTML.
  • AI-generated HTML can mix recognized widgets with custom layout markup.
  • The data-notifal-widget attribute identifies a widget to the builder; frontend behavior still comes from the HTML and Notifal classes.

For readable and editable templates, put copy in semantic text elements such as p, span, headings, links, and buttons. Use div or section primarily for layout.

Good structure:

<div class="notifal-alert-row">
  <span class="notifal-alert-icon" aria-hidden="true">!</span>
  <span>Only {stock_quantity} left in stock!</span>
</div>

Avoid mixing all copy directly into a layout container:

<div class="notifal-alert-row">! Only {stock_quantity} left in stock!</div>

Widgets generated by AI

Noti includes the registered widget structures. When a widget fits the request, the HTML can contain data-notifal-widget so Structure shows a widget badge.

AI may still use free HTML when no widget fits. This is expected.

See HTML Builder: Chat with Noti (AI).

Troubleshooting

ProblemWhat to check
Click inserted the widget in the wrong placeSelect the intended parent in Structure first, or drag the widget for exact placement
No Inside drop area appearsThe target cannot contain children; use before or after
An element cannot be droppedYou may be trying to move it into itself or one of its own descendants
Paste or Paste styles is disabledCopy an element or copy styles first
Widget badge disappeared after editing HTMLKeep data-notifal-widget="widget-id" on the widget's root element
Button or countdown is visible but does not workKeep the required Notifal class and data attributes; see the button guide
Gradient still showsChoose Background Color to replace the gradient with a solid color

HTML Builder series

  1. Creating a Template with the HTML Builder
  2. HTML Builder: Widgets and Structure (you are here)
  3. HTML Builder: Buttons, Close Icon, and Click Tracking
  4. HTML Builder: Chat with Noti (AI)
  5. HTML Builder: AI Prompt Best Practices and Examples
  6. HTML Builder: Layouts and Use Cases
  7. HTML Sanitization and Allowed HTML

For developers