YuhuanStudioYunUIDocs
Patterns

Docs Actions

Documentation page header controls: copy-as-Markdown and view/edit links.

The small action controls for a documentation page header. LLMCopyButton fetches the page's Markdown source and copies it to the clipboard (handy for pasting into an LLM), while ViewOptions offers links to view the raw Markdown and to edit the page on GitHub.

Import

tsx
1import { LLMCopyButton, ViewOptions } from "@yuhuanowo/yunui/patterns";

Copy as Markdown

LLMCopyButton fetches markdownUrl on click and writes the text to the clipboard.

LLMCopyButton

View options

ViewOptions renders a "Markdown" link and, when githubUrl is set, an "Edit on GitHub" link.

ViewOptions

Props

PropTypeDefaultDescription
labels{ copy?: string; copied?: string; title?: string | undefined; } | undefinedEvery string this renders. The library ships no copy of its own — these defaults exist only so the component is usable untranslated.
markdownUrl*string
PropTypeDefaultDescription
githubUrlstring
labels{ markdown?: string; markdownTitle?: string; github?: string | undefined; githubTitle?: string | undefined; } | undefinedEvery string this renders; defaults keep it usable untranslated.
markdownUrl*string

On this page