Build a Sticky-Header Plan Comparison Page with Swipeable Mobile Columns

A single HTML pricing comparison page with a sticky plan header, grouped checkmark rows, a billing toggle and swipeable one-plan columns on phones.

You getone complete HTML file in a single code block, then 3 short ideas to extend it.

The prompt

Prompt
Act as a senior product designer who writes clean, accessible front-end code. Build a pricing feature comparison page for Fieldnote, a fictional research notes app, with four plans: Solo, Team, Studio (highlighted as most chosen) and Institution. Show about 20 features in 5 collapsible groups (Capture & notes, Organization, Collaboration, Storage & security, Support). Each cell holds a checkmark, a dash or a short value like "10 hrs / mo".

Rules:
1. The plan header row (name, price, one-line description, call-to-action button) stays sticky at the top while the feature list scrolls. It compacts into a slimmer bar once it sticks.
2. Below 720px wide, collapse to the feature column plus one plan column at a time. Switch plans with swipe, pill tabs, prev/next arrows or the left/right arrow keys. Use a short slide that is turned off under prefers-reduced-motion.
3. Add a Monthly/Annual billing toggle that updates prices. Add a "Show differences only" toggle that hides rows identical across plans.
4. Use a warm off-white background, deep ink text and one green accent. Tint the highlighted plan column. Checkmarks are inline SVG with screen-reader text.
5. Use ARIA table roles, visible focus rings, and buttons only (no forms, no alerts). Clicking a call-to-action shows a small status toast.
6. No external libraries, fonts, images or storage. Build the rows from a JavaScript data array.

Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.

Example output

One HTML file. Save it and open it in any browser.Open full screen

Example: Fieldnote Plans, a sticky-header feature comparison page.

Scroll the feature list and the plan header sticks to the top, shrinking into a slim bar. Switch Monthly / Annual to update prices, or turn on Show differences only to hide rows that are the same across plans. Click a group title to collapse it. Under 720px wide, you see one plan at a time: swipe, tap a pill or press the arrow keys to switch.

Written by AI from this prompt. Your results will vary.

Tips and common edits

Why this works

  • Building rows from one data array keeps every plan column aligned and lets the differences filter compare values automatically.
  • A sticky header outside any overflow container works reliably, and an observer adds the compact style only once it sticks.
  • Showing one plan column on phones avoids cramped horizontal scrolling while keeping swipe, tabs and keys all in sync.

Paste the prompt into ChatGPT, Claude or Gemini. Save the returned code as fieldnote-plans.html and open it in any browser, or view it in the chat's preview or canvas. Narrow the window to see the swipeable mobile view.

Common edits

  • Swap the Fieldnote data array for your own plans, prices and features, and change the green accent variable to your brand color.
  • Add a fifth plan by extending the plans array and adding one more mobile hide rule for data-plan 4.

Prompt details

By
Prompts-GPT editors
Published
How prompts are written and checked

Did this prompt work?

Keep exploring

More in Design