Skip to content

Add Copy for LLM button to component pages#6029

Open
jmrada14 wants to merge 4 commits intojpmorganchase:mainfrom
jmrada14:copy-for-llm
Open

Add Copy for LLM button to component pages#6029
jmrada14 wants to merge 4 commits intojpmorganchase:mainfrom
jmrada14:copy-for-llm

Conversation

@jmrada14
Copy link

@jmrada14 jmrada14 commented Feb 7, 2026

Summary

  • Adds a "Copy for LLM" button to component documentation pages, next to
    the Code/Design buttons
  • Button copies the full component documentation (all tabs: examples,
    usage, accessibility) as clean markdown to the clipboard
  • Includes inline code examples from LivePreview components
  • API route reads MDX source files from disk, strips JSX/frontmatter, and
    returns clean markdown

Test plan

  • Navigate to a component page (e.g., /salt/components/button/usage)
  • Verify the "Copy for LLM" button appears next to the Code button in
    the heading
  • Click the button and paste into a text editor — verify clean markdown
    with title, description, examples, usage, and accessibility content
  • Verify the button does NOT appear on pattern, foundation, or other
    non-component pages

@changeset-bot
Copy link

changeset-bot bot commented Feb 7, 2026

⚠️ No Changeset found

Latest commit: 90dd53a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Feb 7, 2026

@jmrada14 is attempting to deploy a commit to the FED Team Team on Vercel.

A member of the Team first needs to authorize it.

@jmrada14
Copy link
Author

jmrada14 commented Feb 7, 2026

Changeset does not list docs site.

PR for issue: #6024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant