{
 "kind": "tool",
 "slug": "classnames",
 "path": "tools/classnames/",
 "name": "classnames",
 "maker": null,
 "density": "basic",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Utilities",
   "tools/utilities/"
  ]
 ],
 "lead": "Utility for conditionally combining class names in React and other JavaScript projects.",
 "chips": [
  {
   "label": "Utilities",
   "path": "tools/utilities/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install classnames"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/JedWatson/classnames"
  },
  {
   "label": "Website",
   "href": "https://github.com/JedWatson/classnames#readme"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/JedWatson/classnames"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 5, 2026",
   "note": "",
   "src": "https://github.com/JedWatson/classnames"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "26 projects",
   "status": "info",
   "sub": "#57 of 408 in its category",
   "note": "Dependency in 26 public GitHub projects set up for AI coding agents that we scanned (0.4%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Install only",
   "status": "info",
   "sub": null,
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What classnames does",
   "parts": [
    {
     "t": "prose",
     "text": "Utility for conditionally combining class names in React and other JavaScript projects."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "classnames popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "75",
       "of": "/ 100",
       "l": "Gid Score, #205 overall"
      },
      {
       "n": "50.8M",
       "l": "downloads a week, npm"
      },
      {
       "n": "17.8K",
       "l": "GitHub stars"
      },
      {
       "n": "26",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How classnames is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "classnames is a dependency in 26 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (0.5% of the 4,867 JavaScript/TypeScript ones), #57 of 408 in utilities.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 160; those are left out of every share on this page.",
      "The most used alternative in our scan is clsx (1,212 projects).",
      "Projects that use it most often also use React (100.0%), Framer Motion (50.0%), Radix UI (50.0%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "19 projects, 0.8%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "12 projects, 0.4%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "8 projects, 0.3%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 100.0% of its projects",
       "v": "React",
       "path": "tools/react/"
      },
      {
       "l": "In 50.0% of its projects",
       "v": "Framer Motion",
       "path": "tools/framer-motion/"
      },
      {
       "l": "In 50.0% of its projects",
       "v": "Radix UI",
       "path": "tools/radix-ui/"
      },
      {
       "l": "In 46.2% of its projects",
       "v": "Tailwind CSS Animate",
       "path": "tools/tailwindcss-animate/"
      },
      {
       "l": "In 46.2% of its projects",
       "v": "date-fns",
       "path": "tools/date-fns/"
      },
      {
       "l": "In 57.7% of its projects",
       "v": "Next.js",
       "path": "tools/next/"
      },
      {
       "l": "In 57.7% of its projects",
       "v": "Tailwind Merge",
       "path": "tools/tailwind-merge/"
      },
      {
       "l": "In 42.3% of its projects",
       "v": "Sonner",
       "path": "tools/sonner/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about classnames",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "More in Utilities",
       "path": "tools/utilities/",
       "items": [
        {
         "text": "date-fns",
         "path": "tools/date-fns/"
        },
        {
         "text": "PyYAML",
         "path": "tools/pyyaml/"
        },
        {
         "text": "uuid",
         "path": "tools/uuid/"
        },
        {
         "text": "yaml",
         "path": "tools/yaml/"
        },
        {
         "text": "js-yaml",
         "path": "tools/js-yaml/"
        },
        {
         "text": "glob",
         "path": "tools/glob/"
        },
        {
         "text": "Lodash",
         "path": "tools/lodash/"
        },
        {
         "text": "tqdm",
         "path": "tools/tqdm/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "classnames",
       "me": true,
       "facts": [
        "MIT",
        "Gid 75",
        "50.8M/wk"
       ]
      },
      {
       "name": "clsx",
       "why": "Tiny utility for conditionally constructing className strings.",
       "path": "tools/clsx/",
       "facts": [
        "MIT",
        "Gid 82",
        "179M/wk"
       ]
      }
     ],
     "more": "Compare classnames with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install classnames"
    },
    {
     "t": "gap",
     "text": "No step-by-step start for classnames yet: we have not written its hand-checked card."
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm classnames"
  ],
  [
   "Category",
   "Utilities"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Gid Score",
   "75.1"
  ],
  [
   "Rank in category",
   "#57 of 408"
  ],
  [
   "GitHub",
   "JedWatson/classnames"
  ],
  [
   "Last change",
   "Nov 5, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/jedwatson.png"
}