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
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
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
Did this prompt work?
Keep exploring
More like this
Build a Responsive Three-Tier Pricing Section with Monthly/Yearly Toggle
A single HTML file with three pricing cards, a working billing switch that recalculates prices, a highlighted recommended plan and accessible feature checkmarks.
Build a Light/Dark Mode Toggle Demo Page with Smooth Theme Switching
A single HTML page with a polished light/dark theme switch built on CSS custom properties that defaults to the system theme, honors reduced motion, and uses no storage.
Build a Playful Animated 404 Error Page with SVG Art and Site Search
A complete single-file 404 page with an original animated hot-air balloon SVG, a live-filtering search box and helpful recovery links that respect reduced motion.
Build a Responsive Navigation Bar With Mega Menu and Mobile Drawer in HTML
A complete single-file site header with a hover, click and arrow-key mega menu on desktop and an animated hamburger drawer with accordions on small screens.
Build a SaaS Landing Page Hero with a CSS-Drawn Product Mockup
You get a polished, responsive SaaS hero section in one HTML file, with a strict type scale, realistic copy, working CTAs and an interactive app mockup drawn in pure CSS.
Build a Sortable, Filterable Data Table with Pagination in One HTML File
A polished vanilla JavaScript orders table with column sorting, live search, status filters, row selection with bulk actions, pagination and an empty state, all in one HTML file.
- Build an Accessible Modal, Toast and Tooltip Showcase in One HTML File
- Build an Interactive Habit Tracker Mobile App Prototype in One HTML File
- Design an Accessible Settings Page with Toggles, Segmented Controls and Sliders
- Build a Multi-Step Onboarding Wizard with Stepper and Inline Validation
- Build an Analytics Dashboard with Sidebar, KPI Cards and SVG Charts in One HTML File
- Build an Empty States and Loading Skeletons Gallery in One HTML File