Landing Page
A complete, conversion-optimized sample landing page with customizable sections and a dev toolbar for experimenting with themes.
Sections
The landing page includes five sections optimized for conversion:
- Hero - Headline, subheadline, CTAs, and social proof line
- Testimonials - 3 customer quotes with avatars
- Features - 6-card grid with icons
- Pricing - 3 tiers with monthly/annual toggle
- FAQ - Accordion-style Q&A
Key files
app/(marketing)/page.tsx- Composes all sectionsapp/(marketing)/layout.tsx- Header, footer, theme providercomponents/landing/hero.tsx- Hero sectioncomponents/landing/testimonials.tsx- Testimonials sectioncomponents/landing/features.tsx- Features gridcomponents/landing/pricing.tsx- Pricing tierscomponents/landing/faq.tsx- FAQ accordioncomponents/landing/theme-customizer.tsx- Theme context providercomponents/landing/dev-toolbar.tsx- Dev-only customization toolbar
Customizing content
Each section has its content defined as an array at the top of the file:
// components/landing/features.tsx
const features = [
{
icon: Activity,
title: "Health Scores",
description: "Track customer health...",
},
// Add, remove, or edit items
];
| Section | Array name | Fields |
|---------|------------|--------|
| Testimonials | testimonials | quote, name, role, company, avatar |
| Features | features | icon, title, description |
| Pricing | plans | name, description, monthlyPrice, yearlyPrice, features, cta, href, popular |
| FAQ | faqs | question, answer |
Dev toolbar
In development, a toolbar appears above the header with three controls:
- Color - Slate (default), Blue, Green, Violet
- Font - Inter (default), Geist, Outfit
- Spacing - Compact, Default, Spacious
Preferences persist to localStorage under the key landing-theme.
The toolbar only renders when NODE_ENV === 'development'.
Theme customization context
The landing page uses a React Context for theme state:
import { useTheme, useSpacing } from "@/components/landing";
function MySection() {
const { color, font, spacing } = useTheme();
const { section, gap } = useSpacing();
return (
<section className={cn("px-4", section)}>
<div className={gap}>...</div>
</section>
);
}
Adding a new section
- Create
components/landing/my-section.tsx - Export from
components/landing/index.ts - Add to
app/(marketing)/page.tsx
// components/landing/my-section.tsx
"use client";
import { useSpacing } from "./theme-customizer";
import { cn } from "@/lib/utils";
export function MySection() {
const { section, gap } = useSpacing();
return (
<section className={cn("mx-auto max-w-6xl px-4", section)}>
{/* Your content */}
</section>
);
}
Removing the dev toolbar
The toolbar is automatically hidden in production. To remove it entirely:
- Delete
components/landing/dev-toolbar.tsx - Remove
<DevToolbar />fromapp/(marketing)/layout.tsx - Remove export from
components/landing/index.ts
Design principles
The landing page follows these guidelines:
- Clean typography with generous line-height
- Subtle borders instead of shadows
- Single accent color per view
- Generous whitespace
- No gradients or glow effects
- Animations under 200ms with ease-out
Related: SEO for metadata and OpenGraph images