Skip to content

feat: add vanilla HTML copy support for patterns#136

Open
Lahnshen wants to merge 1 commit intomegh-bari:mainfrom
Lahnshen:feature/add-vanilla-support
Open

feat: add vanilla HTML copy support for patterns#136
Lahnshen wants to merge 1 commit intomegh-bari:mainfrom
Lahnshen:feature/add-vanilla-support

Conversation

@Lahnshen
Copy link

Summary

Adds support for copying patterns as vanilla HTML in addition to React code.

Changes

  • Updated useCopy hook to generate vanilla HTML from pattern styles.
    • The hook now takes the entire pattern object instead of just pattern.code in the pattern parameter.
    • The hook now has a boolean vanilla parameter which specifies whether it should copy the pattern.code or convert pattern.style to a vanilla div element and copy that instead.
  • Added separate "React" and "Vanilla" copy buttons in pattern card components.

How it works

The vanilla output applies all pattern.style properties to a child div similar to how the pattern card component does (pattern-card.tsx:87) and copies that to the clipboard of the user.

@vercel
Copy link

vercel bot commented Jan 19, 2026

@Lahnshen is attempting to deploy a commit to the patterncraft-team Team on Vercel.

A member of the Team first needs to authorize it.

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