</>PackageGraphPackageGraph

clsx

npmv2.1.1TypeScript

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

103.7M
Weekly downloads
1
Dependents
3
Dependencies
99/100
Popularity

Overview

clsx is an npm package that a tiny (239B) utility for constructing className strings conditionally. It is extremely widely used, with about 103.7M downloads per week and 1 known dependents in the graph. The latest version is 2.1.1, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need a tiny (239B) utility for constructing className strings conditionally and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (103.7M weekly downloads).
  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).
  • Lean dependency tree (3 direct dependencies).

Cons

  • No significant drawbacks detected from available metadata.

Auto-generated from collected registry metadata. No external claims are inferred.

Relationship graph

Dependencies (left) and dependents (right) of clsx.

svelteclsx
clsx dependencies dependents

Dependencies

Dev (3)

esm 3.2.25terser 4.8.0uvu 0.5.4

Used by

Popular packages that depend on clsx.

Frequently installed together

Version history

VersionPublishedLicense
2.1.1latest2 years agoMIT
2.1.02 years agoMIT
2.0.12 years agoMIT
2.0.03 years agoMIT
2.0.0-next.03 years agoMIT
1.2.14 years agoMIT
1.2.04 years agoMIT
1.1.16 years agoMIT
1.1.06 years agoMIT
1.0.47 years agoMIT
1.0.37 years agoMIT
1.0.27 years agoMIT
1.0.17 years agoMIT
1.0.07 years agoMIT
0.0.17 years agoMIT

Maintainers

Keywords

Frequently asked questions

How do I install clsx?

Run `npm install clsx` to add clsx to your npm project.

What license is clsx released under?

clsx is distributed under the MIT license.

How popular is clsx?

clsx has approximately 103,711,634 downloads per week and 1 known dependent packages.