AddThisFeature

Popup Builder

Design an on-site popup and control who sees it, when it appears, and how often.

involved Editors & Builders

What it adds

An authoring tool for on-site popups covering content, targeting rules, trigger conditions and frequency, plus the runtime that displays them.

What your agent is told to do

5
  1. 1

    Render popups through the app's existing dialog behaviour rather than a new overlay. If Accessible Modal and Drawer Behaviour or Focus Containment Primitive exists, the popup is built on it and inherits focus trapping, escape handling and scroll locking for free.

  2. 2

    Keep the content model to a few block types the app can actually render: heading, body text, an image, a button, and an email capture field. A free-form layout editor inside a popup is a page builder in disguise and should be deferred.

  3. 3

    Make targeting explicit and default to nobody. An author chooses audience, pages and trigger before the popup can be published, so an unfinished draft never reaches a customer.

  4. 4

    Give the author a preview that runs the real trigger conditions, and a way to see the popup on their own session without publishing it to everyone.

  5. 5

    Do not treat frequency as a per-session detail. Dismissal and conversion must be remembered across sessions for the configured period, because a popup that returns on every visit is the most common reason people leave a site.

Edge cases it handles

8
  • Two popups qualifying at the same moment must not both appear. Queue by author-set priority, show one, and decide explicitly whether the second appears later in the session or not at all.
  • A dismissal must survive the session. Store it per visitor for the period the author configured, and reset it deliberately when the popup's content changes rather than resurrecting an old message.
  • On a small screen a popup can cover the whole page with a close control off the edge. Suppress on viewports below a threshold, or use a layout whose dismiss control is always reachable.
  • Keyboard users must be able to reach the popup and leave it. Focus moves into the popup, stays inside it while open, escape closes it, and focus returns to where it was.
  • A popup that appears before the page settles shifts content under the reader. Delay until after first paint, and overlay rather than inserting into the document flow.
  • Anything the popup collects is personal data. Route email capture through the app's existing consent and storage rules, and never store an address the visitor did not submit.
  • Popup content is authored by customers and shown to the public. Sanitize what authors write and keep the popup unable to run script or embed a third party the site does not control.
  • If a popup embeds anything external, it must render sensibly when that third party is blocked or down, rather than showing an empty box the visitor cannot dismiss.

Definition of done

9
  • Authors can build a popup, set audience, pages, trigger and frequency, and publish it without a deploy.
  • The popup is built on the app's existing dialog behaviour and traps focus, closes on escape, and restores focus.
  • Only one popup shows at a time, chosen by priority.
  • Dismissals persist across sessions for the configured period and reset when the content changes.
  • Popups appear after first paint and never shift page content.
  • Small viewports either suppress the popup or always present a reachable close control.
  • An unpublished or untargeted popup reaches no visitors.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.