# Blog: featured story and recent posts

> A featured article with an image placeholder, alongside a compact list of recent stories.

- Kind: block · Category: Blog · Interactivity: native
- Install: `npx shadcn@latest add @haze/blog-featured-stories`
- File: `src/components/haze/blocks/blog-featured-stories.astro`
- npm dependencies: @lucide/astro
- Registry dependencies: @haze/placeholder, @haze/utils
- Docs page: https://hazeui.com/blocks/blog-featured-stories

## Use when
- Highlighting one article while keeping recent writing visible
- A journal landing page needs dates, categories and summaries

## Avoid when
- Every item should have the same visual weight in a feature overview; use features-icon-grid

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

## Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| id | `string` | "blog-featured-stories" | no | Section ID prefix; use a unique prefix for each instance. |
| eyebrow | `string` | "From the journal" | no | Label above the heading. |
| title | `string` | demo heading | no | Title of the editorial section. |
| description | `string` | demo copy | no | Introductory text for the collection. |
| headingLevel | `1 \| 2 \| 3` | 2 | no | Level of the section heading; article headings follow it. |
| featured | `{ title: string; excerpt: string; category: string; date: string; dateLabel: string; href?: string }` | demo featured article | no | Featured story. Add href to make its title a link. |
| stories | `{ title: string; excerpt: string; category: string; date: string; dateLabel: string; href?: string }[]` | 3 demo stories | no | Recent stories; dates should use ISO format. |
| class | `string` |  | no | Additional classes on the section. |

## Accessibility
- Stories use article elements with machine-readable dates and descriptive optional links.
- The featured artwork is a decorative color placeholder; replace it with an appropriate visual when needed.
- Key Tab: Reach each story title that has a URL.

## Agent prompts

### Install and use

Install the Haze UI block "Blog: featured story and recent posts" with `npx shadcn@latest add @haze/blog-featured-stories`. 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 BlogFeaturedStories from "@/components/haze/blocks/blog-featured-stories.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/blog-featured-stories.md

### Customize with real content

Adapt the Haze blog-featured-stories block for our product. Replace the demo values of these props with our real content: id, eyebrow, title, description, headingLevel, featured, stories, class. Keep the layout, the heading level rules and these accessibility details: Stories use article elements with machine-readable dates and descriptive optional links. The featured artwork is a decorative color placeholder; replace it with an appropriate visual when needed. Do not add raw color classes; use the Haze tokens.

### Choose the right block

Before using blog-featured-stories, check it fits: use it when highlighting one article while keeping recent writing visible; a journal landing page needs dates, categories and summaries. Avoid it when every item should have the same visual weight in a feature overview; use features-icon-grid. Alternatives: @haze/features-icon-grid.

## Example requests that should lead here
- Create a journal section with one featured article and a list of recent posts

## Source

```astro
---
import { ArrowUpRight } from "@lucide/astro";
import { cn } from "../../../lib/haze/utils";
import Placeholder from "../ui/placeholder.astro";

interface Story { title: string; excerpt: string; category: string; date: string; dateLabel: string; href?: string }
interface Props {
  id?: string;
  eyebrow?: string;
  title?: string;
  description?: string;
  headingLevel?: 1 | 2 | 3;
  featured?: Story;
  stories?: Story[];
  class?: string;
}

const {
  id = "blog-featured-stories",
  eyebrow = "From the journal",
  title = "Ideas for better work",
  description = "Practical notes on building thoughtful products and the teams behind them.",
  headingLevel = 2,
  featured = { title: "A calmer way to plan the week", excerpt: "A few small changes can give your team more time to focus and fewer reasons to check in.", category: "Teamwork", date: "2026-11-05", dateLabel: "November 5, 2026" },
  stories = [
    { title: "Make project updates worth reading", excerpt: "Share the context that helps people make decisions.", category: "Practice", date: "2026-10-22", dateLabel: "October 22, 2026" },
    { title: "The case for smaller handoffs", excerpt: "Keep momentum without losing the details.", category: "Product", date: "2026-10-09", dateLabel: "October 9, 2026" },
    { title: "A useful first draft of a roadmap", excerpt: "Start with outcomes, then make room for what you learn.", category: "Planning", date: "2026-09-24", dateLabel: "September 24, 2026" },
  ],
  class: className,
} = Astro.props;
const Heading = ({ 1: "h1", 2: "h2", 3: "h3" } as const)[headingLevel];
const StoryHeading = ({ 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-12 grid gap-8 lg:grid-cols-2 lg:gap-12">
      <article class="overflow-hidden rounded-xl border border-border bg-card">
        <Placeholder variant="app" class="h-48 rounded-none border-0 border-b border-border sm:h-56" />
        <div class="p-6 sm:p-8">
          <p class="text-[0.8125rem]/5 text-muted-foreground"><span class="font-medium text-foreground">{featured.category}</span><span aria-hidden="true"> · </span><time datetime={featured.date}>{featured.dateLabel}</time></p>
          <StoryHeading class="mt-3 text-xl/7 font-semibold tracking-tight text-foreground">
            {featured.href ? <a href={featured.href} class="rounded-sm underline-offset-4 hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring">{featured.title}<ArrowUpRight aria-hidden="true" class="ml-1 inline size-4" /></a> : featured.title}
          </StoryHeading>
          <p class="mt-3 text-sm/6 text-muted-foreground">{featured.excerpt}</p>
        </div>
      </article>
      <div class="divide-y divide-border border-y border-border">
        {stories.map((story) => (
          <article class="py-6 first:pt-6 last:pb-6">
            <p class="text-[0.8125rem]/5 text-muted-foreground"><span class="font-medium text-foreground">{story.category}</span><span aria-hidden="true"> · </span><time datetime={story.date}>{story.dateLabel}</time></p>
            <StoryHeading class="mt-2 text-base/6 font-semibold tracking-tight text-foreground">
              {story.href ? <a href={story.href} class="rounded-sm underline-offset-4 hover:underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring">{story.title}<ArrowUpRight aria-hidden="true" class="ml-1 inline size-4" /></a> : story.title}
            </StoryHeading>
            <p class="mt-2 text-sm/6 text-muted-foreground">{story.excerpt}</p>
          </article>
        ))}
      </div>
    </div>
  </div>
</section>
```
