Package
clsx
A tiny (239B) utility for constructing className strings conditionally.
Key numbers
As of 25 Sept 2026
- Weekly downloads
- 90.3m
- +189% over 12 months
- Gzip bundle size
- -
- No Bundlephobia data
- Dependencies
- 0
- Direct, from package.json
- Last release
- 2 years ago
- v2.1.1
- GitHub stars
- 9.8k
- 185 forks
- Open issues / PRs
- 8 / 8
- Contributors
- 14
- Commits, last 52 weeks
- 0
Downloads
Last week 2026-09-15 to 2026-09-21
90,316,243 downloads last week, 425,611,991 in the last month. The 12-month change of +189% compares the average of the last 4 weeks with the first 4 weeks of the series.
- Releases, last 12 months
- 014 in total
- Latest version
- 2.1.1, 23 Apr 20242 years ago
- First published
- 24 Dec 2018
- Last push to GitHub
- 10 Jun 2024836 days before the snapshot
- Repository archived
- No
- Open issues
- 8
- Open pull requests
- 8
- Commits, last 52 weeks
- 0
- Dependents on npm
- 28,760
Major versions
- v2 first release 2.0.0, 15 Jul 2023
- v1 first release 1.0.0, 25 Dec 2018
- v0 first release 0.0.1, 24 Dec 2018
Recent releases
| Version | Published |
|---|---|
| 2.1.1 | 23 Apr 2024 |
| 2.1.0 | 29 Dec 2023 |
| 2.0.1 | 29 Dec 2023 |
| 2.0.0 | 15 Jul 2023 |
| 1.2.1 | 6 Jul 2022 |
| 1.2.0 | 2 Jul 2022 |
| 1.1.1 | 30 May 2020 |
| 1.1.0 | 3 Feb 2020 |
| 1.0.4 | 6 Apr 2019 |
| 1.0.3 | 18 Feb 2019 |
| 1.0.2 | 3 Feb 2019 |
| 1.0.1 | 11 Jan 2019 |
| 1.0.0 | 25 Dec 2018 |
| 0.0.1 | 24 Dec 2018 |
- Module format
- ESM + CommonJSFrom package.json type, main and exports fields
- TypeScript types
- Bundled
- Node.js engine range
- >=6
- Runtimes
- -
- Unpacked size (npm)
- 8.4 kB
- Dependencies (0)
- None
npm install clsxCDN
jsDelivr: 733k requests in 30 days
- jsDelivr
https://cdn.jsdelivr.net/npm/clsx@2.1.1/ - unpkg
https://unpkg.com/clsx@2.1.1/ - esm.sh
https://esm.sh/clsx@2.1.1
| Package | Weekly downloads | Gzip | Last release | Module | Comparison |
|---|---|---|---|---|---|
| classnames | 24m | - | 2 years ago | CommonJS | - |
Indexability: Indexed.