Skip to content
JS
Package

classnames

A simple utility for conditionally joining classNames together

v2.5.1, 29 Dec 2023MITCommonJSTypes: BundledCSS-in-JS and styling
$ npm install classnames

Key numbers

As of 25 Sept 2026
Weekly downloads
24m
+61% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
0
Direct, from package.json
Last release
2 years ago
v2.5.1
GitHub stars
17.8k
558 forks
Open issues / PRs
4 / 8
Contributors
-
Commits, last 52 weeks
34

Downloads

Last week 2026-09-15 to 2026-09-21
010m20m30m40mSept 2025Mar 2026Sept 2026High 34.1m (18 Aug 2026)Low 9m (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.

23,979,004 downloads last week, 118,169,992 in the last month. The 12-month change of +61% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
030 in total
Latest version
2.5.1, 29 Dec 20232 years ago
First published
5 Nov 2014
Last push to GitHub
23 Sept 20262 days before the snapshot
Repository archived
No
Open issues
4
Open pull requests
8
Commits, last 52 weeks
34
Dependents on npm
45,615

Major versions

  1. v2 first release 2.0.0, 3 May 2015
  2. v1 first release 1.0.0, 5 Nov 2014

Recent releases

VersionPublished
2.5.129 Dec 2023
2.5.028 Dec 2023
2.4.026 Dec 2023
2.3.325 Dec 2023
2.3.213 Sept 2022
2.3.12 Apr 2021
2.3.01 Apr 2021
2.2.68 Jun 2018
2.2.52 May 2016
2.2.425 Apr 2016
2.2.35 Jan 2016
2.2.24 Jan 2016
2.2.126 Nov 2015
2.2.018 Oct 2015
Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
Not declared
Runtimes
-
Unpacked size (npm)
23 kB
Dependencies (0)
None
npm install classnames

CDN

jsDelivr: 3.8m requests in 30 days
  • jsDelivrhttps://cdn.jsdelivr.net/npm/classnames@2.5.1/
  • unpkghttps://unpkg.com/classnames@2.5.1/
  • esm.shhttps://esm.sh/classnames@2.5.1
PackageWeekly downloadsGzipLast releaseModuleComparison
clsx90.3m-2 years agoESM + CommonJS-
Sources: npm registry, npm downloads API, GitHub API, jsDelivr. Data fetched 25 Sept 2026.

Indexability: Indexed.