Cursor prompt for an FAQ section
This Cursor prompt splices a FAQ accordion into an existing landing page with exactly one import and one JSX insertion. It reuses whatever accordion primitive the repo already ships, keeping the heading outline and sibling sections untouched. The customizer supplies the style, palette, typography, and motion blocks before you copy.
Last updated
Add a FAQ accordion section to the existing landing page for {{product}} in this repo, aimed at {{audience}}. This is a single section spliced into the current page — find the file that composes the landing sections and insert the FAQ between the last proof section and the final CTA, changing nothing else in that file beyond the import and one JSX insertion.
Placement and conventions:
- New component beside the other section components, named to match their pattern (FaqSection vs faq-section, per local convention).
- If the repo already ships an accordion primitive (shadcn/Radix, Headless UI, or similar), use it — do not vendor a second accordion. Hand-roll rows (button + aria-expanded + aria-controls, panels keyed by id) only if nothing exists.
- Keep the FAQ copy in a const array at the top of the component file so future edits are diffs to data, not markup.
Behavior spec: single-open accordion — expanding one question collapses the rest; Enter and Space toggle the focused trigger; focus order runs top to bottom through the question buttons. The section heading is an h2, and each question renders as an h3 wrapping its trigger button so the page outline stays intact.
Content spec: six questions written from {{audience}}'s objections to adopting {{product}} — cost of switching, what breaks, security posture, lock-in, proof it works, and support speed. Answers stay under 60 words and each names one concrete thing: a number, a guarantee, or a timeframe. Close the section with a muted one-liner linking to the page's primary action, labeled "{{cta}}".
Visual direction:
{{style}}
Palette: {{palette}}
Typography: {{type}}
Motion: {{motion}}
Spacing: inherit the section-padding class or spacing token neighboring sections use; divide rows with the repo's border token; cap answers near 72ch. Mobile: single column, trigger tap targets at least 44px tall.
After applying the diff, run the dev server and check: surrounding sections render exactly as before; one panel open at a time; the h1-h2-h3 outline holds; the closing "{{cta}}" link matches the hero's destination; no duplicate accordion dependency was added.Customize it
Runs in your browser. Nothing you type here is sent anywhere.
Add a FAQ accordion section to the existing landing page for a project management SaaS in this repo, aimed at engineering managers at startups. This is a single section spliced into the current page — find the file that composes the landing sections and insert the FAQ between the last proof section and the final CTA, changing nothing else in that file beyond the import and one JSX insertion. Placement and conventions: - New component beside the other section components, named to match their pattern (FaqSection vs faq-section, per local convention). - If the repo already ships an accordion primitive (shadcn/Radix, Headless UI, or similar), use it — do not vendor a second accordion. Hand-roll rows (button + aria-expanded + aria-controls, panels keyed by id) only if nothing exists. - Keep the FAQ copy in a const array at the top of the component file so future edits are diffs to data, not markup. Behavior spec: single-open accordion — expanding one question collapses the rest; Enter and Space toggle the focused trigger; focus order runs top to bottom through the question buttons. The section heading is an h2, and each question renders as an h3 wrapping its trigger button so the page outline stays intact. Content spec: six questions written from engineering managers at startups's objections to adopting a project management SaaS — cost of switching, what breaks, security posture, lock-in, proof it works, and support speed. Answers stay under 60 words and each names one concrete thing: a number, a guarantee, or a timeframe. Close the section with a muted one-liner linking to the page's primary action, labeled "start a free trial". Visual direction: Minimal dark style. Near-black canvas (#0A0A0B) with one elevated surface tone (#141416) for cards — never more than two surface steps. Hairline borders (1px, white at 8% opacity) instead of shadows; if a shadow is unavoidable use 0 1px 2px rgba(0,0,0,0.4) and nothing softer. Text in exactly three steps: white at 92% for headings, 60% for body, 40% for captions. Generous negative space — section padding at least 120px on desktop, 64px on mobile. The accent color appears only on interactive elements and one hero highlight, nowhere else. Palette: a strict neutral ramp (white, #F5F5F5, #E5E5E5, #737373, #171717) carries the entire interface; pick one accent and use it only for primary CTAs, active states, and a single hero highlight. If the accent appears more than five times per viewport it stops being an accent. Keep semantic colors (success, error) desaturated so the accent stays in charge. Typography: one geometric sans (a Futura/Poppins-class face) at three weights maximum (400/500/700). Scale: 64-88px hero, 32px section heads, 18px lede, 16px body, 13px caps labels with 0.08em tracking. Tight headline leading (1.05-1.1), relaxed body (1.6). Let the geometry carry the personality — no italics; weight and size do all hierarchy. Motion: none. Zero scroll animations, zero entrance effects — the page is fully composed the instant it paints. Spend the motion budget on input feedback instead: 120-150ms ease-out color and transform transitions on hover and press states only. Hold this constraint absolutely; it is a statement, not an omission. Spacing: inherit the section-padding class or spacing token neighboring sections use; divide rows with the repo's border token; cap answers near 72ch. Mobile: single column, trigger tap targets at least 44px tall. After applying the diff, run the dev server and check: surrounding sections render exactly as before; one panel open at a time; the h1-h2-h3 outline holds; the closing "start a free trial" link matches the hero's destination; no duplicate accordion dependency was added.
Same task in other tools
Questions about this prompt
What if my repo already has a FAQ somewhere else?
Point Cursor at it and say whether to reuse or replace. If it lives on a docs page, this landing-page section can still exist separately — objection-handling copy and documentation serve different readers, and this prompt's content spec writes the former.
Why does the prompt care about h2/h3 structure?
Splicing a section into an existing page is exactly where heading outlines break, and a skipped level hurts both accessibility and how search engines parse the page. Wrapping each trigger in an h3 keeps the document outline valid at zero visual cost.
Cursor added a new accordion package even though I have Radix — now what?
Reject that hunk in the diff review and reply "use the existing Radix accordion from components/ui". The prompt forbids duplicate dependencies, but Cursor sometimes misses installed packages — naming the exact import path fixes it immediately.
Part of the Cursor landing-page cluster — start from the main Cursor landing page prompt.