PHPackages                             doublesecretagency/craft-cpbodyclasses - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. doublesecretagency/craft-cpbodyclasses

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

doublesecretagency/craft-cpbodyclasses
======================================

Adds special classes to the Control Panel's &lt;body&gt; tag.

3.1.0(3mo ago)2437.9k↓83.7%2[1 issues](https://github.com/doublesecretagency/craft-cpbodyclasses/issues)MITPHPCI passing

Since Nov 30Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/doublesecretagency/craft-cpbodyclasses)[ Packagist](https://packagist.org/packages/doublesecretagency/craft-cpbodyclasses)[ RSS](/packages/doublesecretagency-craft-cpbodyclasses/feed)WikiDiscussions v3-dev Synced 3d ago

READMEChangelog (2)Dependencies (2)Versions (13)Used By (0)

[![Plugin icon](https://raw.githubusercontent.com/doublesecretagency/craft-cpbodyclasses/v2/src/icon.svg)](https://raw.githubusercontent.com/doublesecretagency/craft-cpbodyclasses/v2/src/icon.svg)

Control Panel Body Classes plugin for Craft CMS
===============================================

[](#control-panel-body-classes-plugin-for-craft-cms)

**Add special classes to the Control Panel's `` tag.**

---

**Pairs perfectly with the [Control Panel CSS](https://github.com/doublesecretagency/craft-cpcss) and [Control Panel JS](https://github.com/doublesecretagency/craft-cpjs) plugins!**

After you've installed the plugin, go to:

- **Settings &gt; Plugins &gt; Control Panel Body Classes**

From the settings page, you can select which classes you want to use:

[![](src/resources/img/example-settings.png)](src/resources/img/example-settings.png)

These special classes will now be included in the `` tag of the CP. You can use these classes to manipulate the CSS &amp; JavaScript of the Control Panel however you choose.

---

But why?
--------

[](#but-why)

Because there are a million things that you may want to do in your control panel, and many of them are conditional. Perhaps you want your CSS (or JS) to only take effect for a certain user group, or only on a specific page. Use these special classes to hone in on your targets with precision!

This plugin is designed to work in tandem with [Control Panel CSS](https://github.com/doublesecretagency/craft-cpcss) and/or [Control Panel JS](https://github.com/doublesecretagency/craft-cpjs).

---

Disclaimer
----------

[](#disclaimer)

> It's important to note that showing/hiding fields via CSS and JavaScript is **purely cosmetic**. Those fields may remain accessible to a savvy user, so don't rely on this plugin to guarantee access/denial of any DOM elements. **We accept no liability for any security issues arising from the use of this plugin.**

---

Anything else?
--------------

[](#anything-else)

We've got other plugins too!

Check out the full catalog at [doublesecretagency.com/plugins](https://www.doublesecretagency.com/plugins)

###  Health Score

53

—

FairBetter than 96% of packages

Maintenance79

Regular maintenance activity

Popularity36

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity70

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 ~303 days

Recently: every ~363 days

Total

11

Last Release

105d ago

Major Versions

v2.x-dev → 3.0.02024-02-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/b9ec4fd6e26eb61622c4e869ab85bc19af660fbba9c0679a86c7cb39ac980c2a?d=identicon)[lindseydiloreto](/maintainers/lindseydiloreto)

---

Top Contributors

[![lindseydiloreto](https://avatars.githubusercontent.com/u/5309692?v=4)](https://github.com/lindseydiloreto "lindseydiloreto (27 commits)")

---

Tags

control-panelcraftcraftcmscssjavascriptjavascriptcsscmsCraftcraftcmscraft-plugincp-body-classes

### Embed Badge

![Health badge](/badges/doublesecretagency-craft-cpbodyclasses/health.svg)

```
[![Health](https://phpackages.com/badges/doublesecretagency-craft-cpbodyclasses/health.svg)](https://phpackages.com/packages/doublesecretagency-craft-cpbodyclasses)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

102393.6k70](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.9k](/packages/verbb-comments)[doublesecretagency/craft-cpcss

Add custom CSS to your Control Panel.

117462.8k9](/packages/doublesecretagency-craft-cpcss)[verbb/navigation

Create navigation menus for your site.

92705.0k18](/packages/verbb-navigation)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)

PHPackages © 2026

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