component-docs-header
/component-docs-header
This skill should be used when the user asks to "add a component header", "add a ComponentHeader to the X docs page", "change the header demo for X", or otherwise discusses the live demo shown at the top of a component's usage page in the `docs/` site. For a whole new docs page, start with component-docs-page, which hands off here.
- Author
- tyler-technologies-oss ↗
- Repository
- forge ↗
- Licence
- Apache-2.0
- Last repository change
- 11.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 11.11.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
This skill should be used when the user asks to "add a component header", "add a ComponentHeader to the X docs page", "change the header demo for X", or otherwise discusses the live demo shown at the top of a component's usage page in the `docs/` site. For a whole new docs page, start with component-docs-page, which hands off here.
Triggers from the description
Original author description
This skill should be used when the user asks to "add a component header", "add a ComponentHeader to the X docs page", "change the header demo for X", or otherwise discusses the live demo shown at the top of a component's usage page in the `docs/` site. For a whole new docs page, start with component-docs-page, which hands off here.
How it works
- Placement
- Props (docs/src/components/ComponentHeader.astro)
- Choosing a style
- Rules
SKILL.md preview
---
name: component-docs-header
description: This skill should be used when the user asks to "add a component header", "add a ComponentHeader to the X docs page", "change the header demo for X", or otherwise discusses the live demo shown at the top of a component's usage page in the `docs/` site. For a whole new docs page, start with component-docs-page, which hands off here.
---
# Component Docs Header
Every component page in `docs/src/content/components/<slug>/usage.mdx` opens with a `<ComponentHeader>`: a live, clipped demo of the real component that replaces static screenshots. Reference headers: `button/header.astro` (centered) and `app-layout/header.astro` (cover + inset).
## Placement
Each demo lives in its own `header.astro`, next to the component's `usage.mdx`. The same file renders twice: full size at the top of the usage page, and as a thumbnail on the All components page (`docs/src/pages/components/index.astro`, which loads every `*/header.astro` with `import.meta.glob`). Forward the `thumbnail` prop to `ComponentHeader` so both work:
```astro
---
// docs/src/content/components/<slug>/header.astro
import ComponentHeader from "../../../components/ComponentHeader.astro";
const { thumbnail = false } = Astro.props;
---
<ComponentHeader {thumbnail}>
<forge-button>Button</forge-button>
</ComponentHeader>
```
In `usage.mdx`, import it and render it directly after the imports and before `## Usage`:
```mdx
import Header from "./header.astro";
<Header />
## Usage
```
Don't write `<ComponentHeader>` inline in the MDX: a component without a `header.astro` gets no thumbnail on the All components page. The Forge Design skill generator drops `<Header />` the same way it drops `<ComponentHeader>`.
The frame is at least 200px tall and grows to fit the demo. Cover mode with `zoom` other than 1 uses a fixed frame (200px, or the `height` prop).
## Props (`docs/src/components/ComponentHeader.astro`)
| Prop | Default | Purpose |
| ------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------- |
| `fit` | `"center"` | `"center"` centers the demo both ways; `"cover"` fills the frame and clips overflow |
| `zoom` | `1` | Above 1 magnifies a region (anchored at `origin`); below 1 shrinks to show more, top-left |
| `origin` | `"center"` | CSS `transform-origin` for `zoom` > 1 in cover mode (e.g. `"top left"`) |
| `height` | `"200px"` | Frame height for cover mode with `zoom` other than 1 (transformed demos can't grow the frame) |
| `inset` | `"32px"` | Cover mode only: CSS inset shorthand (`"0"` for edge to edge); shows the frame background around a rounded, bordered demo |
| `interactive` | `true` | Pass `{false}` to make the demo `inert` |
| `thumbnail` | `false` | Set by the All components page, not by hand: renders a 160px, half-scale, inert, `aria-hidden` preview |
## Choosing a style
- **Small components** (button, badge, chip, switch): `fit="center"` with 1–3 variants side by side.
- **Large components** (app layout, scaffold, table, drawer): `fit="cover"` (inset 32px by default), and `zoom` below 1 to show the overall shape, or above 1 with `origin` to spotlight one region. It is an abstract but real representation; never show the whole thing.
- Overlay components (dialog, menu, popover): show a closed trigger or a static, non-overlay representation. Don't open a modal on page load.
## Rules
- Use real Forge markup. Get snippets from the Forge MCP (`get_forge_blocks`, `get_component_docs`) rather than guessing; follow the root CLAUDE.md block guidelines (no placeholder attributes, h2 under app layout, etc.).
- Register every component and icon the demo uses in `docs/src/scripts/forge-components.ts` (side-effect import for components, `IconRegistry.define` for icons). Unregistered icons render blank; substitute a registered one or add it.
- Style with Forge components and Tailwind utilities only. No custom CSS (see `docs/CLAUDE.md`).
- Keep the demo static and self-contained: no scripts, no external assets, no content that needs a network.- A new page also needs complete frontmatter (`title`, `description`, `status`, `source`, `category`, optional `storybookId`) matching `docs/src/content.config.ts`.
- Don't start the dev server to verify (see `docs/CLAUDE.md`); ask the user to check the rendered page.
Versions
The database has no other skills named component-docs-header.
Database snapshot: 13.11.2026 · package version 194fc7042551 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100component-docs-page
This skill should be used when the user asks to "add X to the docs site", "create the docs page for a new component", "document the new X component", "add a usage page for X", or otherwise discusses publishing a component (new, migrated, or undocumented) on the `docs/` site. It… - 100docs-demo
Add an interactive demo to the Remotion documentation. Use when creating a new <Demo> component for docs pages. - 100docs-demo
Add an interactive demo to the Remotion documentation. Use when creating a new <Demo> component for docs pages. - 100write-docs
Generate documentation for custom elements based on their manifest data. Use when the user asks to "write docs", "generate documentation", "document this element", "create API docs", or mentions "usage examples" or "component documentation". - 100add-docs-page
Add, move, rename, or delete a page on the LangChain docs site. Covers choosing the source directory, writing frontmatter, placing the entry in src/docs.json navigation, adding redirects, and verifying with the lint and broken-link gates. Use when asked to add a new doc or page,… - 100using-docs-kit
Set up and author a documentation site with @lobehub/docs-kit (the `lobedocs` CLI, React Router + Vite static docs used by ui.lobehub.com). Covers consumer repo layout, docs.config.ts, package scripts, component doc pages (index.mdx frontmatter, `?demo` imports, <Demo>, <Api>),…