Skip to content

feat(preferred): add classnames to replacements - #1151

Merged
43081j merged 1 commit into
e18e:mainfrom
RizgarOzan:feat/classnames-clsx
Oct 23, 2026
Merged

43081j merged 1 commit into
e18e:mainfrom
RizgarOzan:feat/classnames-clsx

Conversation

@RizgarOzan

Copy link
Copy Markdown
Contributor

🔗 Linked issue

Closes #1148

📚 Description

This adds classnames to the preferred manifest with clsx as the replacement, plus a docs page.

clsx takes the same strings, objects, arrays and falsy values, so for most code the swap is just the import. I ran both packages (classnames 2.5.1, clsx 2.1.1) side by side on a set of inputs: plain strings, objects, nested arrays, numbers, null/undefined/false, and duplicate names. They gave the same output everywhere except objects with a custom toString(). classnames calls it, while clsx treats the object as a class map. The docs page mentions that, along with the missing dedupe/bind variants and the clsx/lite entry point.

Checked locally with pnpm lint:manifests, prettier --check on the changed files and pnpm build. Both packages are well above the download threshold (about 19M and 76M per week).

@43081j
43081j merged commit 674cefa into e18e:main Oct 23, 2026
5 checks passed
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.

[Replacement]: classnames

2 participants