@rt('/test-lp')
def test_landing_page():
return LandingPageSimple(
brand_name="FastHTML",
hero_title="Build faster with FastHTML",
hero_subtitle="Compose production-ready pages with Material-inspired components wired for HTMX.",
hero_primary_cta={'text': 'Get Started', 'href': '/signup'},
hero_secondary_cta={'text': 'View Docs', 'href': '/docs'},
footer_copyright="Β© 2026 FastHTML",
# Benefits (bento showcase) - 2 big + 3 small cards with image on top
benefits=[
{'title': 'Lightning Fast', 'description': 'Built for speed with optimized rendering and minimal overhead.'},
{'title': 'Secure by Default', 'description': 'Enterprise-grade security with automatic CSRF protection.'},
{'title': 'Infinitely Scalable', 'description': 'From prototype to production, scale seamlessly.'},
{'title': 'Beautiful Design', 'description': 'Material Design 3 components that look polished out of the box.'},
{'title': 'Developer First', 'description': 'Pure Python API β no JavaScript or build tools required.'},
],
benefits_title="Why FastHTML?",
benefits_subtitle="Built for modern teams",
# Features (bento grid) - first 2 are big, rest small
features=[
{"icon": "dashboard", "title": "Page primitives", "description": "Hero, feature, pricing sections ready to use.", "size": "big"},
{"icon": "bolt", "title": "HTMX ready", "description": "Live previews in notebook with zero config.", "size": "big"},
{"icon": "palette", "title": "Color tokens", "description": "Material container classes."},
{"icon": "extension", "title": "Composable", "description": "Extend with extra classes."},
{"icon": "security", "title": "Accessible", "description": "WCAG friendly defaults."},
{"icon": "rocket_launch", "title": "Fast iteration", "description": "nbdev keeps code and docs together."},
],
features_title="Everything you need",
features_subtitle="Mix heroes, features, pricing, and FAQs.",
# Pricing
pricing_title="Simple Pricing",
pricing_plans=[
{"name": "Starter", "monthly_price": 9.99, "yearly_price": 99.99,
"features": ["5 users", "Basic support"], "cta_text": "Start Free", "cta_href": "/signup"},
{"name": "Pro", "monthly_price": 29.99, "yearly_price": 299.99,
"features": ["Unlimited users", "Priority support", "API access"],
"cta_text": "Get Pro", "cta_href": "/signup", "highlight": True},
],
# FAQ
faqs=[
{"question": "Can I mix components?", "answer": "Yes. Every helper returns plain FastHTML nodes."},
{"question": "How do colors work?", "answer": "Apply Material container classes to any wrapper."},
{"question": "Is HTMX required?", "answer": "No. Interactions degrade gracefully."},
],
# Footer uses STANDARD_FOOTER_COLUMNS by default (omit footer_columns to use standard)
footer_social_links=[{"icon": "code", "href": "https://github.com"}],
)
preview(test_landing_page())