elements
Start Docs Blog Demos UI Pricing
Elements Manual
  • Getting Started
  • CLI
  • Build
  • Browser
  • Packages
  • TypeScript
  • Elements HTML
  • Assets
  • RPC
  • Router
  • Session
  • Database
  • Migrations
  • LiveTable
  • Channel
  • Jobs
  • Email
  • Payments
  • JSON
  • Async
  • Style
  • UI
  • JSOC
  • Config
  • Tests
  • Logs
  • Deploy
  • Editors
  • Recipes
    • Todo App
    • Todo App: Markup and Styles
    • Authentication
    • Form Validation
    • Signup with Email Confirmation
    • Signup Wizard
    • Admin Roles
    • File Upload
    • Serving Assets From the Database
    • Live Comments
    • Likes / Votes Toggle
    • Shared Lists
    • Team-Partitioned Table
    • Chat Rooms
    • Typing Indicator
    • Grouped Feed Without Flicker
    • Unread Counts
    • Room Presence
    • Collaborative Canvas
    • Infinite Scroll Feed
    • Bidirectional Partition
    • Search and Filter
    • Admin Table
    • Markdown Blog
    • Public and Admin Views
    • Cron Cache
    • Live Dashboard
    • Live Updates From Any Write
    • Marketing Page
    • Status Indicators
    • Markdown Editor
    • Time Ago
  • Licenses
  • Issues
  • Changelog
Manual / Recipes/ Marketing Page

Marketing Page

elements man recipes/marketing-page

On This Page

  • Page setup
  • Styles
  • Routes
  • Notes

A dark landing page with a hero, a three-feature row, three pricing tiers, and a footer. The recipe uses @elements/ui: a hero CTA is a Button with href, the pricing tiers are Cards, and the dark colors come from one class on the page that overrides nine CSS variables. No database, no RPC, no LiveTable: the recipe is a route, a template, and a style.css.

Page setup

Terminal
elements create page marketing

The page has no attributes and no rpc. The route renders the template; the template contains all the content and style.css contains the dark theme overrides.

app/pages/marketing/index.ts
import { Request, Response } from "@elements/app"; import marketing from "./template"; export default function route(req: Request, res: Response) { return new marketing(); }
app/pages/marketing/template.ehtml
import "./style.css"; import { Button } from "@elements/ui/button"; import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, } from "@elements/ui/card"; interface Tier { name: string; price: string; blurb: string; features: string[]; cta: string; emphasis: boolean; } const TIERS: Tier[] = [ { name: "starter", price: "$9", blurb: "for side projects and prototypes.", features: ["1 app", "shared workers", "email support"], cta: "choose starter", emphasis: false, }, { name: "pro", price: "$29", blurb: "for teams shipping production apps.", features: ["unlimited apps", "dedicated workers", "priority support"], cta: "choose pro", emphasis: true, }, { name: "enterprise", price: "custom", blurb: "for orgs with security and compliance needs.", features: ["everything in pro", "SSO + SAML", "managed onboarding"], cta: "talk to sales", emphasis: false, }, ]; const FEATURES = [ { title: "one workspace", body: "projects, tasks, and files in one place, shared with your whole team.", }, { title: "real-time by default", body: "every change appears for everyone on the team the moment it is made.", }, { title: "set up in minutes", body: "import your projects, invite your team, and start the same afternoon.", }, ]; <html class="page-marketing"> <main class="page-shell"> <section class="hero"> <h1>ship projects in days, not months.</h1> <p class="lead"> acme keeps your projects, your tasks, and your team in one live workspace. </p> <div class="cta-row"> <Button href="/signup" variant="primary" size="lg">get started</Button> <Button href="/docs" size="lg">read the docs</Button> </div> </section> <section class="features"> <h2>everything you need, nothing you don't.</h2> <ul class="feature-grid"> <li e:for={f of FEATURES}> <h3>{f.title}</h3> <p>{f.body}</p> </li> </ul> </section> <section class="pricing"> <h2>simple pricing.</h2> <div class="tiers"> <Card e:for={t of TIERS} class={t.emphasis ? "tier is-featured" : "tier"}> <CardHeader> <CardTitle>{t.name}</CardTitle> <p class="price">{t.price}<span class="cadence" e:if={t.price !== "custom"}>/mo</span></p> <CardDescription>{t.blurb}</CardDescription> </CardHeader> <CardContent> <ul class="checks"> <li e:for={feat of t.features}>{feat}</li> </ul> </CardContent> <CardFooter align="stack"> <Button href="/signup" variant={t.emphasis ? "primary" : "outline"}>{t.cta}</Button> </CardFooter> </Card> </div> </section> </main> <footer> <nav> <a href="/about">about</a> <a href="/docs">docs</a> <a href="/blog">blog</a> <a href="/changelog">changelog</a> <a href="/contact">contact</a> </nav> <p class="copy">© 2026 acme. made for builders.</p> </footer> </html>

The <html class="page-marketing"> tag has the class that elements create page marketing writes. Every rule in style.css below starts with .page-marketing, so it applies only to this page.

The hero CTAs are Buttons with href, so each renders an <a> styled as a button; variant="primary" picks the fill and size="lg" the height.

The pricing tiers iterate TIERS and emit a Card each, built from its parts: CardHeader with the CardTitle and CardDescription, CardContent for the feature list, and CardFooter align="stack" for a full-width CTA. The emphasized tier adds is-featured through class and takes the primary variant for its button; the rest are outline buttons.

The feature row uses a <ul> with e:for over the FEATURES constant. No images, no icons in the recipe; the focus is the layout.

Styles

app/pages/marketing/style.css
@import "#app/shared/styles/page.css"; /** * Dark surface for the marketing page. Overriding the design-system * tokens on `.page-marketing` flips every nested element (buttons, cards, * anchors) to the dark palette without restyling each one. */ .page-marketing { --bg: #0a0a0c; --bg-soft: #16161a; --ink: #f5f5f7; --ink-dim: #9ea1a8; --rule: #2a2b30; --rule-soft: #1f2024; --accent: #7c7cff; --accent-deep: #a3a3ff; --accent-soft: rgba(124, 124, 255, 0.14); background: var(--bg); color: var(--ink); min-height: 100vh; } /** * Hero section. Centered copy on a reading width, with a primary * and secondary CTA below the lead. */ .page-marketing .hero { max-width: var(--container-4xl); margin: 0 auto; padding: var(--space-24) var(--container-padding) var(--space-16); text-align: center; } .page-marketing .hero h1 { font-size: var(--text-4xl); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); margin: 0 0 var(--space-6); } .page-marketing .hero .lead { font-size: var(--text-lg); color: var(--ink-dim); max-width: var(--container-prose); margin: 0 auto var(--space-10); } .page-marketing .hero .cta-row { display: inline-flex; gap: var(--space-4); } /** * Features. Three-column grid of value props. */ .page-marketing .features { max-width: var(--container-wide); margin: 0 auto; padding: var(--space-16) var(--container-padding); text-align: center; } .page-marketing .features h2 { font-size: var(--text-2xl); margin: 0 0 var(--space-12); } .page-marketing .feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-10); list-style: none; padding: 0; margin: 0; text-align: left; } .page-marketing .feature-grid h3 { font-size: var(--text-lg); margin: 0 0 var(--space-3); } .page-marketing .feature-grid p { color: var(--ink-dim); margin: 0; line-height: var(--leading-body); } /** * Pricing tiers. Three Cards; the featured one takes the accent border. */ .page-marketing .pricing { max-width: var(--container-wide); margin: 0 auto; padding: var(--space-16) var(--container-padding); text-align: center; } .page-marketing .pricing h2 { font-size: var(--text-2xl); margin: 0 0 var(--space-12); } .page-marketing .tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); text-align: left; } .page-marketing .tier.is-featured { border-color: var(--accent); } .page-marketing .tier .price { font-size: var(--text-2xl); font-weight: var(--weight-semibold); margin: var(--space-2) 0; } .page-marketing .tier .price .cadence { font-size: var(--text-md); color: var(--ink-dim); font-weight: var(--weight-regular); } .page-marketing .checks { list-style: none; padding: 0; margin: 0; } .page-marketing .checks li { padding: var(--space-2) 0; border-top: 1px solid var(--rule-soft); } .page-marketing .checks li:first-child { border-top: none; } /** * Footer. Horizontal nav above a copyright line. */ .page-marketing footer { max-width: var(--container-wide); margin: 0 auto; padding: var(--space-12) var(--container-padding); border-top: 1px solid var(--rule); text-align: center; } .page-marketing footer nav { display: inline-flex; gap: var(--space-8); margin-bottom: var(--space-4); } .page-marketing footer nav a { color: var(--ink-dim); text-decoration: none; } .page-marketing footer nav a:hover { color: var(--ink); } .page-marketing footer .copy { color: var(--ink-dim); font-size: var(--text-sm); margin: 0; }

The dark colors are nine variable overrides on .page-marketing. Every element inside the page (cards, buttons, anchors, text) takes its colors from those variables, so overriding them changes the whole page from light to dark without restyling any individual element. The card's own padding, header and footer come from Card; the page styles only the price line and the feature list inside it.

The layout uses the --container-* width caps from the design system: --container-4xl (56rem) for the hero copy, --container-wide (80rem) for the feature and pricing grids. --container-padding (var(--space-8)) gives a consistent gutter at the viewport edge.

Routes

Register the page in index.ts:

index.ts
import marketing from "#app/pages/marketing"; // ... app.route("/", marketing);

Notes

  • The page class sets the theme. Every dark color on this page is set in the .page-marketing rule. Remove the class and the page uses the default light colors. Add a second wrapper class with its own variable overrides for a "summer" theme, a tenant-branded theme, or a print stylesheet.
  • Link as button. <Button href="/signup"> renders an <a> with the design system's .button class, so a link and a <button> on the same page match. A bare <a class="button is-primary"> renders the same link without the Button template.
  • Pricing tiers from data. The TIERS constant is in the template module; rendering iterates the array. To pull pricing from the database (per-tenant pricing, A/B-tested copy), turn the constant into a select in the route handler and pass the array through as a template attribute.
  • No JS-driven interactivity. The page has no oninput, no onclick, no RPC calls. Every byte of the rendered HTML is in the first response. The browser can paint the page without running any JavaScript, so the page works with JavaScript disabled. Add interactivity (newsletter signup, theme toggle) to the one element that needs it; the other markup stays static.
  • Token customization. The marketing wrapper overrides nine tokens. The full set of token names is in elements man ui/themes; pick the ones that matter for the look you want and override them locally. Avoid hardcoding raw hex or px values in .page-marketing rules; use a token first.
Prev Live Updates From Any WriteNext Status Indicators
Product
Manual Pricing Compare
Company
History Contact
Legal
Privacy Policy Acceptable Use Terms License Agreement
© Elements Dev Corporation 2026