Skip to content
JS
Package

clsx

A tiny (239B) utility for constructing className strings conditionally.

v2.1.1, 23 Apr 2024MITESM + CommonJSTypes: BundledCSS-in-JS and styling
$ npm install clsx

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
050m100m150mSept 2025Mar 2026Sept 2026High 122.2m (18 Aug 2026)Low 22.6m (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

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

  1. v2 first release 2.0.0, 15 Jul 2023
  2. v1 first release 1.0.0, 25 Dec 2018
  3. v0 first release 0.0.1, 24 Dec 2018

Recent releases

VersionPublished
2.1.123 Apr 2024
2.1.029 Dec 2023
2.0.129 Dec 2023
2.0.015 Jul 2023
1.2.16 Jul 2022
1.2.02 Jul 2022
1.1.130 May 2020
1.1.03 Feb 2020
1.0.46 Apr 2019
1.0.318 Feb 2019
1.0.23 Feb 2019
1.0.111 Jan 2019
1.0.025 Dec 2018
0.0.124 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 clsx

CDN

jsDelivr: 733k requests in 30 days
  • jsDelivrhttps://cdn.jsdelivr.net/npm/clsx@2.1.1/
  • unpkghttps://unpkg.com/clsx@2.1.1/
  • esm.shhttps://esm.sh/clsx@2.1.1
PackageWeekly downloadsGzipLast releaseModuleComparison
classnames24m-2 years agoCommonJS-
Sources: npm registry, npm downloads API, GitHub API, jsDelivr. Data fetched 25 Sept 2026.

Indexability: Indexed.