PHPackages                             ryanpotter/silverstripe-design-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. ryanpotter/silverstripe-design-field

ActiveSilverstripe-module

ryanpotter/silverstripe-design-field
====================================

Silverstripe Design Field

0.1.1(10y ago)6532[1 issues](https://github.com/Rhym/silverstripe-design-field/issues)4BSD-3-ClauseCSS

Since Aug 26Pushed 9y ago3 watchersCompare

[ Source](https://github.com/Rhym/silverstripe-design-field)[ Packagist](https://packagist.org/packages/ryanpotter/silverstripe-design-field)[ RSS](/packages/ryanpotter-silverstripe-design-field/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (4)

\#Silverstripe Design Field A field that can generate inline styles for an object. The field is saved into the database as a JSON string. Here's an example of the output:

```
{
   "selector":".myobject",
   "padding-top":"100px",
   "padding-bottom":"100px",
   "margin-top":"10px",
   "margin-bottom":"10px",
   "background":"#ffffff"
}
```

\###Methods Summary

- | - ---- | ---- public | \_\_construct($name, $title = null, $selector = null, $fields = null, $value = null) The *$fields* parameter supports pretty much all silverstripe fields, bar UploadFields and FileFields. ###Screenshot [![Design Field](https://cloud.githubusercontent.com/assets/1136811/9507672/e9ae41f4-4ca3-11e5-8ef4-3d5ecf36afc9.png)](https://cloud.githubusercontent.com/assets/1136811/9507672/e9ae41f4-4ca3-11e5-8ef4-3d5ecf36afc9.png)\###Example Usage

```
private static $db = array(
  'MyObject' => 'Design'
);
```

```
DesignField::create('MyObject', _t('DesignField.MyObject', 'My Object'),
  '.myobject',
  array(
      'padding-top' => 'TextField',
      'padding-right' => 'TextField',
      'padding-bottom' => 'TextField',
      'padding-left' => 'TextField',
      'margin-top' => 'TextField',
      'margin-right' => 'TextField',
      'margin-bottom' => 'TextField',
      'margin-left' => 'TextField',
      'color' => 'ColorField',
      'background' => 'ColorField',
      'font-size' => array(
          'type' => 'DropdownField',
          'value' => array(
              '16px',
              '25px',
              '36px'
          )
      )
  ));
```

Return the string of styles

```
$this->dbObject('MyObject')->InlineStyle();
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

Total

2

Last Release

3912d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/13a1b78f31cdad3eecbe5d11aadc3f5c527f76cde37710ab91dc03c42565f152?d=identicon)[RyanPotter](/maintainers/RyanPotter)

---

Top Contributors

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

---

Tags

silverstripe

### Embed Badge

![Health badge](/badges/ryanpotter-silverstripe-design-field/health.svg)

```
[![Health](https://phpackages.com/badges/ryanpotter-silverstripe-design-field/health.svg)](https://phpackages.com/packages/ryanpotter-silverstripe-design-field)
```

###  Alternatives

[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[silverstripe-themes/simple

The SilverStripe simple theme (default SilverStripe 3 theme)

411.3M8](/packages/silverstripe-themes-simple)[sheadawson/silverstripe-editlock

Prevents a CMS user from editing a record that another CMS user is currently editing

25113.0k](/packages/sheadawson-silverstripe-editlock)

PHPackages © 2026

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