# Features: alternating product stories

> A series of feature stories alternating text and image placeholders.

- Kind: block · Category: Features · Interactivity: none
- Install: `npx shadcn@latest add @haze/features-alternating`
- File: `src/components/haze/blocks/features-alternating.astro`
- npm dependencies: none
- Registry dependencies: @haze/placeholder, @haze/utils
- Docs page: https://hazeui.com/blocks/features-alternating

## Use when
- Explaining a few features that each need their own visual context
- A sequential product story is more useful than a compact icon grid

## Avoid when
- Many short benefits need equal space; use features-icon-grid

## Alternatives
- [features-icon-grid](https://hazeui.com/blocks/features-icon-grid.md)

## Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| id | `string` | "features-alternating" | no | Unique section ID prefix. |
| eyebrow | `string` | "How it helps" | no | Label above the introduction. |
| title | `string` | demo heading | no | Section heading. |
| description | `string` | demo copy | no | Introduction to the feature stories. |
| headingLevel | `1 \| 2 \| 3` | 2 | no | Section heading level; feature headings use the next level. |
| features | `{ label: string; title: string; description: string; visual: "app" \| "chart" \| "photo" }[]` | 3 example stories | no | Stories and their decorative placeholder variants. |
| class | `string` |  | no | Additional classes on the section. |

## Accessibility
- Feature headings follow the section heading in document order, even when the visual position alternates.
- Illustrative placeholders are decorative; each story is explained in text.

## Agent prompts

### Install and use

Install the Haze UI block "Features: alternating product stories" with `npx shadcn@latest add @haze/features-alternating`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "https://hazeui.com/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import FeaturesAlternating from "@/components/haze/blocks/features-alternating.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: https://hazeui.com/blocks/features-alternating.md

### Customize with real content

Adapt the Haze features-alternating block for our product. Replace the demo values of these props with our real content: id, eyebrow, title, description, headingLevel, features, class. Keep the layout, the heading level rules and these accessibility details: Feature headings follow the section heading in document order, even when the visual position alternates. Illustrative placeholders are decorative; each story is explained in text. Do not add raw color classes; use the Haze tokens.

### Choose the right block

Before using features-alternating, check it fits: use it when explaining a few features that each need their own visual context; a sequential product story is more useful than a compact icon grid. Avoid it when many short benefits need equal space; use features-icon-grid. Alternatives: @haze/features-icon-grid.

## Example requests that should lead here
- Explain three product capabilities with alternating text and product screenshots

## Source

```astro
---
import { cn } from "../../../lib/haze/utils";
import Placeholder from "../ui/placeholder.astro";

interface Props {
  id?: string;
  eyebrow?: string;
  title?: string;
  description?: string;
  headingLevel?: 1 | 2 | 3;
  features?: { label: string; title: string; description: string; visual: "app" | "chart" | "photo" }[];
  class?: string;
}

const {
  id = "features-alternating",
  eyebrow = "How it helps",
  title = "A little more clarity at every step",
  description = "Keep the details close to the work, from the first idea to the final handoff.",
  headingLevel = 2,
  features = [
    { label: "01 / Plan", title: "Give ideas a place to grow", description: "Collect the context, owners and next steps for a project before work begins.", visual: "app" },
    { label: "02 / Follow through", title: "See progress without a meeting", description: "Keep the latest status alongside the work so updates are easy to find.", visual: "chart" },
    { label: "03 / Share", title: "Bring the right people in", description: "Give collaborators a shared view of decisions and the details behind them.", visual: "app" },
  ],
  class: className,
} = Astro.props;
const Heading = ({ 1: "h1", 2: "h2", 3: "h3" } as const)[headingLevel];
const ItemHeading = ({ 1: "h2", 2: "h3", 3: "h4" } as const)[headingLevel];
---

<section aria-labelledby={`${id}-title`} class={cn("bg-background px-6 py-20 sm:py-24", className)}>
  <div class="mx-auto max-w-6xl">
    <div class="max-w-2xl">
      <p class="text-[0.6875rem]/4 font-medium tracking-wider text-muted-foreground uppercase">{eyebrow}</p>
      <Heading id={`${id}-title`} class="mt-3 text-3xl/9 font-semibold tracking-tight text-balance text-foreground sm:text-4xl/11">{title}</Heading>
      <p class="mt-4 text-base/7 text-pretty text-muted-foreground">{description}</p>
    </div>
    <div class="mt-14 grid gap-16 sm:gap-20">
      {features.map((feature, index) => (
        <div class="grid items-center gap-8 lg:grid-cols-2 lg:gap-16">
          <div class={cn("max-w-md", index % 2 === 1 && "lg:order-2")}>
            <p class="font-mono text-[0.6875rem]/4 font-medium tracking-wider text-muted-foreground uppercase">{feature.label}</p>
            <ItemHeading class="mt-3 text-2xl/8 font-semibold tracking-tight text-foreground">{feature.title}</ItemHeading>
            <p class="mt-4 text-base/7 text-pretty text-muted-foreground">{feature.description}</p>
          </div>
          <Placeholder variant={feature.visual} class="aspect-[4/3]" />
        </div>
      ))}
    </div>
  </div>
</section>
```
