Docs, related links


Install
npx shadcn add @klarhimmel/docs-relatedDetailsAbout, usage, props and more
A titled row of link chips: the blocks a page uses, related components.
Import
Import
- docs/related
- Category
- Documentation sections: headers, install panels, props tables, previews. New project? Set it up once: /get-started/installation.
Notes
When to use it
A short row of link chips pointing to the blocks a page uses or to related components. Use docs-pager when you need ordered previous and next steps instead.
Writing for it
- Each chip is one link with a label; the block takes 1 to 12 of them. Use the names a reader would search for. - The title holds 60 characters and the description 200. A title such as Used in this page tells a reader what the chips have in common. - Put the most closely related link first, since the row wraps and the later chips can end up on a second line.
Watch out for
A chip with an empty label is not drawn, so clearing a label removes that link from the published page instead of leaving a blank pill.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
Props
The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | 'Name the related set' | Text, up to 60 characters. |
description | string | '' | Text, up to 200 characters. |
links | Link[] | 6 items | List of 1 to 12. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |