Full page plan comparison
A full screen dialog holding three plans and a billing switch, so a price can be read without leaving the page.
Links in the preview stay on the block.
Open on its ownThe prompt
One prompt, written to stand on its own: goal, structure, type, colour, spacing, behaviour and the words in square brackets to replace. Paste it into any tool that writes HTML. The Code tab has this block as one file.
665 words
# Full page plan comparison One overlays component, not a whole page: build it to drop into a page that already exists. Works in Claude, v0, Lovable, Bolt, Cursor or any tool that writes HTML. ## Goal A full screen overlay comparing three plans for a money or invoicing app: a dialog over the page, not a section in it. ## Structure 1. A native dialog pinned to all four edges, scrolling inside itself 2. Head row: an h2 naming the currency, a round close button 3. A segmented control: monthly, and yearly naming the saving 4. A three column panel over a hairline: plan name, who it suits, price, unit, three features, a button 5. A footnote: tax line, one currency link ## Type Gambetta (Fontshare) 500 for h2, plan names, prices; alternative Playfair Display. Switzer 400 to 600 elsewhere; alternative Switzer. h2 clamp(36px,5vw,56px)/1.05, tracking -0.01em. Segment 500 14px/1. Plan name 500 24px/1.1, its line 16px/1.5. Price 500 44px/1 tabular, unit 14px. Features 15px/1.9. Buttons 600 16px. Footnote 13px/1.5. ## Colour Dialog #FFFFFF, ink #0F100D, muted #5E6158, hairline #E0E1DC, backdrop rgba(15,16,13,.45). Filled button #0F100D with #FFFFFF text; ghost transparent, 1px #E0E1DC; pressed segment #0F100D with white text; close hover #F4F5F3. Prices stay ink. AA: #5E6158 and #0F100D on #FFFFFF, #FFFFFF on #0F100D. ## Spacing and lines Padding clamp(24px,4vw,40px), top clamp(28px,5vw,64px); container max 1080px. Head row gap 16px, 28px under. Control 1px border, radius 999px, padding 4px, 40px buttons, 28px under. Three equal columns over a 1px line, each padded 28px 24px 28px 0 with a 1px right border, the inner two adding 24px left. Price 18px above; features 20px above, 24px below. ## Behaviour A small script opens it with showModal from a pricing link; the close button, Escape and a backdrop click close it, return focus there and clear overflow hidden from html. It fades from opacity 0 and 24px down over 380ms cubic-bezier(.22,1,.36,1), backdrop the same. Segments swap aria-pressed: yearly multiplies each price by ten and rewrites the unit, so one list serves both. Buttons press to scale .97 over 180ms. Reduced motion drops both. ## Responsive Under 980px one column: no right border, a 1px bottom border, 24px vertical padding, h2 clamp(32px,8.4vw,46px). Under 640px the control wraps and its buttons go full width. ## Accessibility Labelled by the h2 id. Close button aria-label Close, 44px square. The control is a group labelled Billing period, buttons carrying aria-pressed. Buttons 50px tall, prices tabular. Focus ring 2px solid #0F100D offset 3px. The dialog holds focus; Escape closes. ## Built values (from code.html) - Fonts: Gambetta 400, 500, 600 (Fontshare); Switzer 400, 500, 600 (Fontshare). - Colour variables: --paper #F4F5F3, --card #FFFFFF, --ink #0F100D, --muted #5E6158, --line #E0E1DC, --sun #FFD21F, --sun-d #F2C200, --night #0F100D, --v-bg #FFFFFF, --v-ink #0F100D, --v-muted #5E6158, --v-line #E0E1DC, --v-accent #0F100D, --v-accent-ink #FFFFFF. - Font variables: --display "Gambetta",Georgia,serif; --text "Switzer",system-ui,"Noto Sans",sans-serif. - Size variables: --g clamp(20px,4vw,64px), --v-radius 20px. - Media queries: max-width 640px, max-width 980px, prefers-reduced-motion. - No media files. - Script: none, CSS only. ## Content to replace - [Overlay title]: plans plus the viewer's currency - [Billing options]: two labels, the second naming the saving - [Plan names]: three names, cheapest first, a line on who each suits - [Prices]: three figures and a unit - [Features]: three capabilities per plan - [Buttons and footnote]: three labels, tax line, one link ## Rules Plain, specific copy that reads as a live product; never the word sample. No shadows, glow, glass, blur, gradient text, emoji or italics. Motion moves transform and opacity, with colour, border, height and stroke transitions on state changes, and holds its end state under prefers-reduced-motion. Text passes WCAG AA. ## Output Return the block in one piece: the markup, one style block with the web fonts imported on its first line, and a small script only if the behaviour needs one. No page wrapper, no framework, no build step. Prefix every class with `blk-` and put the colours and sizes in CSS variables at the top.
More like this



