PHPackages                             codemonauts/craft-unit-field - 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. codemonauts/craft-unit-field

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

codemonauts/craft-unit-field
============================

Craft CMS plugin to add a field with a range of values and predefined units of measurement.

2.0.0(4y ago)12.3k1proprietaryPHPPHP ^8.0

Since Jul 11Pushed 4y ago2 watchersCompare

[ Source](https://github.com/codemonauts/craft-unit-field)[ Packagist](https://packagist.org/packages/codemonauts/craft-unit-field)[ RSS](/packages/codemonauts-craft-unit-field/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

Field with Range of Values and predefined Units of Measurement for Craft CMS
============================================================================

[](#field-with-range-of-values-and-predefined-units-of-measurement-for-craft-cms)

[![Icon](resources/unitfield.png)](resources/unitfield.png)

This field allows you to enter two values as range and selecting a predefined unit of measurement. Perfect to store dimensions or other ranges of values for products.

Requirements
------------

[](#requirements)

- Craft CMS &gt;= 4.0.0

Installation
------------

[](#installation)

Open your terminal and go to your Craft project:

```
cd /path/to/project
composer require codemonauts/craft-unit-field
./craft install/plugin unitfield
```

Plugin Settings
---------------

[](#plugin-settings)

In the settings you can define all available units of measurement. You can also group units to easier select them later.

[![Plugin settings](resources/plugin-settings.png)](resources/plugin-settings.png)

Field Settings
--------------

[](#field-settings)

In every field you can set a default unit of measurement and a Twig template to render the table cells in the index of entries.

[![Field settings](resources/field-settings.png)](resources/field-settings.png)

Input
-----

[](#input)

The input field has two text inputs for the minimum and maximum value and a dropdown to choose the unit of measurement.

[![Input](resources/input.png)](resources/input.png)

Usage in templates
------------------

[](#usage-in-templates)

In templates you can access the minimum and maximum values as well as the unit value and the corresponding label:

```
{{ entry.myField.min }} to {{ entry.myField.max }} {{ entry.myField.unitLabel }}
```

Translation
-----------

[](#translation)

All label can be translated. Use a translation file named `unitfield.php` in the language's translation directory.

With ❤ by [codemonauts](https://codemonauts.com)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

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

Total

2

Last Release

1470d ago

Major Versions

1.0.0 → 2.0.02022-05-06

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/539161?v=4)[codemonauts](/maintainers/codemonauts)[@codemonauts](https://github.com/codemonauts)

---

Top Contributors

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

---

Tags

unitcmsfieldCraftcraftcmscraft-plugin

### Embed Badge

![Health badge](/badges/codemonauts-craft-unit-field/health.svg)

```
[![Health](https://phpackages.com/badges/codemonauts-craft-unit-field/health.svg)](https://phpackages.com/packages/codemonauts-craft-unit-field)
```

###  Alternatives

[verbb/navigation

Create navigation menus for your site.

90683.7k17](/packages/verbb-navigation)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.1k](/packages/verbb-comments)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[supercool/tablemaker

Create customizable and user-defined table fields.

40141.7k](/packages/supercool-tablemaker)[verbb/vizy

A flexible visual editor field for Craft.

4348.6k](/packages/verbb-vizy)

PHPackages © 2026

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