Classcat
JSON →Classcat is a minimalist, performant JavaScript utility for constructing HTML `class` attribute strings dynamically. It allows developers to combine strings, arrays, and objects (where keys are class names and values are booleans for conditional inclusion) into a single, space-delimited class string. The current stable version is 5.0.5, with releases occurring on an as-needed basis to address bug fixes, type improvements, and modernization efforts. Key differentiators include its small bundle size (217 B minified+gzipped), high performance (up to 2.5x faster than alternatives), and framework-agnostic nature, making it suitable for any JavaScript project, including those using React, Lit-HTML, or Mithril. Version 5.x introduced a shift to ES Modules as the primary distribution, modernizing the codebase and dropping some legacy support.
Traffic · last 30 days ↑0% vs prev 7d
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇨🇦 Canada · 🇸🇬 Singapore · 🇫🇷 France