PHPackages                             ilimic/classnames - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ilimic/classnames

ActiveLibrary

ilimic/classnames
=================

A simple utility for conditionally joining CSS classes together.

1.1.5(2y ago)114[1 PRs](https://github.com/ilimic1/classnames/pulls)MITPHPPHP 7.4.\* || 8.0.\* || 8.1.\* || 8.2.\* || 8.3.\*CI passing

Since Aug 23Pushed 1y ago2 watchersCompare

[ Source](https://github.com/ilimic1/classnames)[ Packagist](https://packagist.org/packages/ilimic/classnames)[ RSS](/packages/ilimic-classnames/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (19)Used By (0)

Classnames
==========

[](#classnames)

A simple PHP utility for conditionally joining CSS classes together. Similar to JavaScript [Classnames](https://github.com/JedWatson/classnames).

[![Latest Version](https://camo.githubusercontent.com/9f17331938a29f9a55d29b84cd459cb70e22134052f8a96dcd582aca40b12083/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f696c696d6963312f636c6173736e616d65733f6c6162656c3d4c617465737425323056657273696f6e267374796c653d666c61742d737175617265)](https://github.com/ilimic1/classnames/releases)[![Packagist PHP Version](https://camo.githubusercontent.com/3ff8781cc93b765fce15adfd9ebe948a7fd52ac80151f811fa4d4ae7c3877a27/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f696c696d69632f636c6173736e616d65732f7068703f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/3ff8781cc93b765fce15adfd9ebe948a7fd52ac80151f811fa4d4ae7c3877a27/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f696c696d69632f636c6173736e616d65732f7068703f7374796c653d666c61742d737175617265)[![Tests](https://github.com/ilimic1/classnames/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/ilimic1/classnames/actions/workflows/tests.yml)

Installing classnames
---------------------

[](#installing-classnames)

The recommended way to install classnames is through [Composer](https://getcomposer.org/):

```
composer require ilimic/classnames
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~59 days

Recently: every ~139 days

Total

11

Last Release

767d ago

PHP version history (4 changes)1.0.0PHP ^7.4 || ^8

1.0.1PHP ^7.4 || ^8.0

1.1.0PHP 7.4.\* || 8.0.\* || 8.1.\* || 8.2.\*

1.1.5PHP 7.4.\* || 8.0.\* || 8.1.\* || 8.2.\* || 8.3.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/45e6485e5893e06a60f67555068f3fa05a8b2e45bd050b54ed7212c49ae82616?d=identicon)[ilimic](/maintainers/ilimic)

---

Top Contributors

[![ilimic1](https://avatars.githubusercontent.com/u/9499343?v=4)](https://github.com/ilimic1 "ilimic1 (50 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ilimic-classnames/health.svg)

```
[![Health](https://phpackages.com/badges/ilimic-classnames/health.svg)](https://phpackages.com/packages/ilimic-classnames)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
