# Article Layout

> A blog post page: breadcrumb, title, standfirst, authors and reading time over a wide cover. The table of contents is built from the post's own headings, pins beside the text, tracks the section you're reading and folds into a menu on phones. A progress bar, a share rail, heading anchors, author bios and related posts frame it, with figure, callout and pull-quote parts for the body.

- Slug: `article-layout`
- Category: [Blog](https://www.assembli.design/category/blog.md)
- Type: block
- Tags: blog, article, post, table-of-contents, scrollspy, reading-progress, share
- npm dependencies: motion, lucide-react
- shadcn/ui dependencies: none
- Live preview: https://www.assembli.design/preview/article-layout
- Page: https://www.assembli.design/components/article-layout

![Article Layout preview](https://www.assembli.design/thumbnails/article-layout-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `category` | `{ label: string; href: string }` |  | Breadcrumb back to the index, e.g. { label: "Engineering", href: "/blog/engineering" }. |
| `title` (required) | `React.ReactNode` |  |  |
| `dek` | `React.ReactNode` |  | The standfirst under the title. |
| `authors` (required) | `ArticleAuthor[]` |  |  |
| `date` (required) | `string` |  | ISO date, e.g. "2026-10-21". Formatted in UTC so server and browser agree. |
| `readingTime` | `number` |  | Minutes. |
| `cover` | `{ src: string; alt: string; caption?: React.ReactNode }` |  |  |
| `children` (required) | `React.ReactNode` |  | The article. Top-level h2 and h3 elements become the table of contents and get anchor links. |
| `tags` | `string[]` |  |  |
| `related` | `ArticleRelated[]` |  |  |
| `shareUrl` | `string` |  | The canonical URL to share. Defaults to the page's own URL at the time of sharing. |
| `stickyTop` | `number` | `0` | Distance from the top of the viewport for the sticky bar, TOC and anchors, e.g. under a site header. |

## Install

One-time setup (needs a subscription):

1. Add the registry to the project's `components.json`: `{"@assembli":{"url":"https://www.assembli.design/r/{name}.json","headers":{"Authorization":"Bearer ${ASSEMBLI_API_KEY}"}}}` (merge into `"registries"`).
2. Put an API key from https://www.assembli.design/account in `.env.local` as `ASSEMBLI_API_KEY=asm_…`.

Then install with the shadcn CLI (writes `components/article-layout/article-layout.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/article-layout
```

Registry item JSON: https://www.assembli.design/r/article-layout.json (send `Authorization: Bearer <api key>`)

## Code

> Component source needs an Assembli subscription ($12/month or $96/year) and an API key sent as `Authorization: Bearer <key>`. To get one without copying anything, POST https://www.assembli.design/api/agent/login (or call the MCP tool connect_account), show the user the link it returns, and poll https://www.assembli.design/api/agent/token for the key. Or subscribe at https://www.assembli.design/pricing and create a key at https://www.assembli.design/account.
