StealThis .dev

Paywall — Inline feature-locked gate (pro badge)

An inline feature-gate pattern for a fictional Northwind workspace, where premium controls in a settings panel and editor toolbar carry a PRO pill and a small lock icon. Clicking a locked row or tool opens a positioned popover that explains it is a Pro feature and offers an upgrade. A demo upgrade flips the plan badge, unlocks every gated row with a live toggle, clears the toolbar locks, and updates the side-by-side plan cards with an annual-billing price toggle.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Inline feature-locked gate (pro badge)

A workspace settings screen for the fictional Northwind editor, showing how to gate premium controls in place rather than behind a separate pricing page. Two editor-toolbar buttons and three setting rows are marked with a bold PRO pill and a small lock SVG, while a header chip keeps a running, aria-live count of how many features are still locked. Alongside the panel sit Starter and Pro plan cards with real-feeling feature checklists, a highlighted Most popular ribbon, and a working annual-billing toggle that recomputes the price.

Clicking any locked tool or row opens a single shared popover (role="dialog") that is positioned next to the trigger — it flips above when there isn’t room below, clamps to the viewport, and points its arrow at the control. Focus moves to the Upgrade button, Escape closes it and returns focus, and an outside click dismisses it. The popover’s body names the specific feature being gated.

Choosing Upgrade runs a demo unlock: the plan badge switches from Starter to Pro, each gated row loses its lock and PRO pill and gains a live toggle (staggered for a satisfying cascade), the toolbar locks disappear, the locked-count chip turns into a success state, and the main upgrade button settles into a confirmed state. A small toast() helper confirms every action. The layout reflows to a single column and full-width controls down to 360px.

Illustrative UI only — fictional brand, plans, and prices.