PHPackages                             trendyminds/craft-spacing - 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. trendyminds/craft-spacing

ActiveCraft-plugin

trendyminds/craft-spacing
=========================

A utility field to insert spacing between your Matrix blocks

2.0.0(2y ago)0520[1 issues](https://github.com/trendyminds/craft-spacing/issues)mitPHPPHP ^8.2

Since Apr 25Pushed 2y ago2 watchersCompare

[ Source](https://github.com/trendyminds/craft-spacing)[ Packagist](https://packagist.org/packages/trendyminds/craft-spacing)[ RSS](/packages/trendyminds-craft-spacing/feed)WikiDiscussions craft-4 Synced 1mo ago

READMEChangelog (7)Dependencies (2)Versions (10)Used By (0)

Spacing
=======

[](#spacing)

🤔 What is this?
---------------

[](#-what-is-this)

Like our [Design Tokens](https://github.com/trendyminds/craft-design-tokens) plugin, this is a Craft dropdown fieldtype where the options and the values are controllable via JSON files. However, it's highly specific if you use Matrix as a "page builder". This will render a "Top" and a "Bottom" dropdown in a single field and spare you from having to add two discrete spacing fields to every block one-by-one.

If you use Tailwind the JIT process only runs against Tailwind values it finds in your filesystem. If you have a class like `h-12` in your database there's nothing Tailwind can do to find that (unless you enable Project Config, but do you *really* want Tailwind crawling your Project Config?).

Spacing allows you to define the values within JSON files on your filesystem, making it possible to use Tailwind's JIT process and provide a simple way to add and edit new values to your dropdowns.

⚠️ Careful, though!
-------------------

[](#️-careful-though)

Editing these JSON files means it's possible to break the output of your data. For example:

```
{
  "standard": "h-12",
+ "tighter": "h-6",
- "tight": "h-6",
  "none": "h-0"
}
```

Changing "tight" to "tighter" would break any entry using "tight"! Now when it tries to locate the value of "tight" it will come up empty until you've changed all of those values.

📝 Usage
-------

[](#-usage)

To setup your spacing options, create a `config/spacing.json` file in your project.

```
{
  "standard": "h-12",
  "tight": "h-6",
  "none": "h-0"
}
```

```
{# Outputs the value of the selected top option (h-12, h-6, h-0) #}
{{ entry.mySpacingField.top }}

{# Outputs the value of the selected bottom option (h-12, h-6, h-0) #}
{{ entry.mySpacingField.bottom }}

{# Outputs the entire configuration in config/spacing.json #}
{{ entry.mySpacingField.config }}
```

📦 Installing
------------

[](#-installing)

Install Spacing in one of two ways:

- [Install via Craft's Plugin Store](https://plugins.craftcms.com/spacing)
- Run `composer require trendyminds/craft-spacing` and enable the plugin from "Settings &gt; Plugins"

🤝 Contributing
--------------

[](#-contributing)

If you'd like to contribute please submit a pull request for review. We try to review and accept contributions whenever possible!

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

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

Recently: every ~84 days

Total

7

Last Release

772d ago

Major Versions

0.7.1 → 1.0.12023-04-26

0.7.3 → 2.0.02024-03-27

PHP version history (3 changes)1.0.0PHP &gt;=8.0.2

0.7.0PHP &gt;=7.3

2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/51ee860b8a11c81c32b2d0bf9f90e23067fcf3cf72476bfab89913bf0e1ea3b3?d=identicon)[trendyminds](/maintainers/trendyminds)

---

Top Contributors

[![aaronbushnell](https://avatars.githubusercontent.com/u/315202?v=4)](https://github.com/aaronbushnell "aaronbushnell (2 commits)")

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/trendyminds-craft-spacing/health.svg)

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

###  Alternatives

[spicyweb/craft-neo

A Matrix-like field type with block hierarchy

395798.1k10](/packages/spicyweb-craft-neo)[nystudio107/craft-seomatic

SEOmatic facilitates modern SEO best practices &amp; implementation for Craft CMS 5. It is a turnkey SEO system that is comprehensive, powerful, and flexible.

1741.4M46](/packages/nystudio107-craft-seomatic)[craftcms/commerce

Craft Commerce

243416.9k153](/packages/craftcms-commerce)[putyourlightson/craft-blitz

Intelligent static page caching for creating lightning-fast sites.

153471.5k29](/packages/putyourlightson-craft-blitz)[verbb/navigation

Create navigation menus for your site.

90683.7k17](/packages/verbb-navigation)[verbb/image-resizer

Resize assets when they are uploaded.

127269.1k7](/packages/verbb-image-resizer)

PHPackages © 2026

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