# Getting Started

Install the Marketing system and style your first section.

## Overview

Marketing pages present Tempo to the public. They explain what Tempo is, who it is for, and why it matters, and lead the reader to a next step. `@tempoxyz/ds/marketing` ships the variables and authoring helpers for these pages.

* **Home Page (tempo.xyz):** Introduces Tempo and routes each reader onward.
* **Campaigns (Landing pages):** Carry one message to one audience at a time.
* **Launches (Announcements):** Present a new feature, partner, or upgrade.
* **Events (Event pages):** Show the agenda, the speakers, and registration.

## Agent Prompt

Paste this prompt into your coding agent:

Read ds.tehq.dev/marketing/introduction/getting-started and help me build a Tempo marketing page
with Tempo Design System.

## Setup

### Install the Library

Install `@tempoxyz/ds` and its Zyzz peer. Marketing ships from the same package.

```sh
npm install @tempoxyz/ds zyzz
```

### Choose Framework

Choose a compilation target and a variable mode:

* **TDS Variables (Quick):** Uses the Marketing variables as they ship.
* **Custom Variables (Advanced):** Extends the Marketing variables with site tokens.

### Vite

### Configure Vite

Add Zyzz beside the existing framework plugin.

```ts title="vite.config.ts"
import { defineConfig } from 'vite'
import { zyzz } from 'zyzz/vite'

export default defineConfig({
  plugins: [zyzz()],
  ssr: { noExternal: ['@tempoxyz/ds', 'zyzz'] },
})
```

Run the existing dev or build command. The plugin emits the Marketing variables, the Inter, Pilat, and JetBrains Mono fonts, and keyframes once, and each module emits its own rules. You import no stylesheet.

With `ssr.noExternal`, the plugin reads the library's contracts in a server build.

#### TDS Variables (Quick)

### Style a Section

Import `style` from `@tempoxyz/ds/marketing`, and style your markup with Marketing tokens.

```tsx title="Hero.tsx"
import { style } from '@tempoxyz/ds/marketing'

export function Hero() {
  return (
    <section {...styles.hero()}>
      <h1 {...styles.title()}>Payments at internet speed</h1>
      <p {...styles.lead()}>Move money anywhere in under a second.</p>
    </section>
  )
}

namespace styles {
  export const hero = style({
    backgroundColor: 'background.primary',
    paddingBlock: '64',
    paddingInline: '24',
  })

  export const lead = style({ color: 'content.secondary', typography: 'body.b1' })

  export const title = style({ color: 'content.primary', typography: 'display.d1' })
}
```

Tokens such as `content.primary`, `'64'`, and `display.d1` type-check against the Marketing variables. Light and dark values follow the inherited `color-scheme`.

#### Custom Variables (Advanced)

### Define Config

Extend the Marketing variables with site tokens, and export the bound helpers.

```ts title="zyzz.config.ts"
import { variables } from '@tempoxyz/ds/marketing'
import { Config, Vars } from 'zyzz'

export const { style, vars } = Config.create({
  id: 'site',
  vars: Vars.extend(variables, { spacing: { section: '7.5rem' } }, { id: 'site/vars' }),
})
```

Place `zyzz.config.ts` at the root of the site source, such as `src/zyzz.config.ts`. The Vite plugin scans its directory for global styles.

### Style a Section

Apply `vars()` to the site root. Style your markup with the bound `style` helper, which accepts Marketing and site tokens.

```tsx title="Hero.tsx"
import { style, vars } from './zyzz.config.js'

export function Site() {
  return (
    <main {...vars()}>
      <Hero />
    </main>
  )
}

function Hero() {
  return (
    <section {...styles.hero()}>
      <h1 {...styles.title()}>Payments at internet speed</h1>
    </section>
  )
}

namespace styles {
  export const hero = style({ paddingBlock: 'section', paddingInline: '24' })

  export const title = style({ color: 'content.primary', typography: 'display.d1' })
}
```

### Other Bundlers

### Configure the Bundler

Add the matching unplugin adapter to the bundler configuration. Keep the existing TypeScript and JSX transforms.

```ts title="rollup.config.ts"
import { zyzz } from 'zyzz/unplugin'

const plugins = [zyzz.rollup()]
// Use zyzz.webpack() or zyzz.esbuild() for those bundlers.
```

Load the emitted stylesheet and script in the document. Adjust the paths to the deployment base.

```html title="index.html"
<link rel="stylesheet" href="/zyzz.css" />
<script src="/zyzz.js"></script>
```

Run the existing build command. [Bundler Setup](https://zyzz.style/docs/api/unplugin) lists the configuration for each bundler.

#### TDS Variables (Quick)

### Style a Section

Import `style` from `@tempoxyz/ds/marketing`, and style your markup with Marketing tokens.

```tsx title="Hero.tsx"
import { style } from '@tempoxyz/ds/marketing'

export function Hero() {
  return (
    <section {...styles.hero()}>
      <h1 {...styles.title()}>Payments at internet speed</h1>
      <p {...styles.lead()}>Move money anywhere in under a second.</p>
    </section>
  )
}

namespace styles {
  export const hero = style({
    backgroundColor: 'background.primary',
    paddingBlock: '64',
    paddingInline: '24',
  })

  export const lead = style({ color: 'content.secondary', typography: 'body.b1' })

  export const title = style({ color: 'content.primary', typography: 'display.d1' })
}
```

Tokens such as `content.primary`, `'64'`, and `display.d1` type-check against the Marketing variables. Light and dark values follow the inherited `color-scheme`.

#### Custom Variables (Advanced)

### Define Config

Extend the Marketing variables with site tokens, and export the bound helpers.

```ts title="zyzz.config.ts"
import { variables } from '@tempoxyz/ds/marketing'
import { Config, Vars } from 'zyzz'

export const { style, vars } = Config.create({
  id: 'site',
  vars: Vars.extend(variables, { spacing: { section: '7.5rem' } }, { id: 'site/vars' }),
})
```

### Style a Section

Apply `vars()` to the site root. Style your markup with the bound `style` helper, which accepts Marketing and site tokens.

```tsx title="Hero.tsx"
import { style, vars } from './zyzz.config.js'

export function Site() {
  return (
    <main {...vars()}>
      <Hero />
    </main>
  )
}

function Hero() {
  return (
    <section {...styles.hero()}>
      <h1 {...styles.title()}>Payments at internet speed</h1>
    </section>
  )
}

namespace styles {
  export const hero = style({ paddingBlock: 'section', paddingInline: '24' })

  export const title = style({ color: 'content.primary', typography: 'display.d1' })
}
```

> [!NOTE]
> The Marketing variables change as the Marketing designs define their own values. Marketing ships no components yet.
