Copy Page markdown
A split button that copies the page as Markdown or opens it in ChatGPT, Claude, v0 and more.
Preview
Installation
- 1
Run the following command
npx shadcn@latest add https://localhostui.com/r/copy-page-markdown.json
Props
| Prop | Type | Default | Description |
|---|---|---|---|
markdown | string | — | Raw markdown source for the current page. Used as the clipboard content for the "Copy Page" button. Falls back to pageUrl if omitted. |
pageUrl | string | window.location.href on the client if omitted | Canonical URL of the current page. Used to build the "View as markdown" (.md) link and the "Open in V0 / Claude / ChatGPT" deep links. |
githubUrl | string | — | Source URL for this page's file on GitHub. When provided, an "Open in GitHub" item appears in the dropdown; when omitted, that item is not rendered at all. |
extraItems | MenuItem[] | — | Additional dropdown items appended after the default set (View as markdown, V0, Claude, ChatGPT, GitHub). Each item needs id, label, icon, external, and onSelect. Ignored if items is provided. |
items | MenuItem[] | — | Full override for the dropdown item list. When provided, replaces all default items (and extraItems is ignored) — use this to reorder, remove, or fully customize the built-in options. |