PHPackages                             fleflis/carbon-field-slider - 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. fleflis/carbon-field-slider

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fleflis/carbon-field-slider
===========================

Carbon Fields extension, that adds a Slider field type.

1.1.0(5y ago)012GPL-2.0+JavaScript

Since Mar 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/fleflis/carbon-field-slider)[ Packagist](https://packagist.org/packages/fleflis/carbon-field-slider)[ Docs](https://fleflis.dev)[ RSS](/packages/fleflis-carbon-field-slider/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (4)Used By (0)

Creating a new Carbon Field
===========================

[](#creating-a-new-carbon-field)

Step-by-step guide on how to create a new Carbon Field.

Introduction
------------

[](#introduction)

The [Carbon Fields](https://github.com/htmlburger/carbon-fields) library has many built-in fields, but you may find it necessary to define a new type of field for your specific project needs.

The following tutorial will explain how to create a custom Carbon Field.

### Step 1: Download the template

[](#step-1-download-the-template)

To make it as easy as possible, we have prepared a Carbon Field template that contains a frame for the PHP Carbon Field class and a webpack build process.

You can download the template from here:

Template Structure

- `/src` - field files folder
- `/languages` - folder for .po, .mo and .pot files
- `/core` - folder for all of your .php files
- `/field.php` - bootstrapping php code

### Step 2: Name your field

[](#step-2-name-your-field)

Replace the `YOURFIELDNAME` and `yourfieldname` (case sensitive) placeholders in all files. Also rename the files that contain the placeholders.

**NB!** If your field name contains multiple words, for example Image Gallery, your class names should look like this:

- **PHP class:** `Image_Gallery_Field`
- **Field Component Registration:** `image_gallery` (refer to `registerFieldType`@`/src/index.js`)

### Step 3: Build assets

[](#step-3-build-assets)

1. Execute `composer dump-autoload` to create the required `autoload.php` which needs to be included in your theme.
2. Execute `yarn install` in the root directory to install all build process requirements.
3. Execute `yarn build` to build the final minimized bundle

##### Optional

[](#optional)

Execute `yarn start` to continuously build bundle during development. Note that you should add `define( 'SCRIPT_DEBUG', true );` to your `wp-config.php` file in order to load the files generated by the dev build process.

### Step 4: Customize

[](#step-4-customize)

Here is a quick overview of some of the methods you can customize:

#### PHP

[](#php)

`to_json()`

You can use this method to modify the field properties that are passed to the React component which represents the field.

`field_type_activated`

Used for initialization processes that are called once per field type (e.g. setup localization files).

`admin_enqueue_scripts()`

Used to enqueue CSS/JavaScript files.

`admin_init()`

Called for each field instance when the field is initialized. (back-end)

`init()`

Called for each field instance when the field is initialized. (back-end, front-end)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

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

3

Last Release

1876d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34070776?v=4)[Christian Sanches](/maintainers/fleflis)[@fleflis](https://github.com/fleflis)

---

Top Contributors

[![christian-sanches](https://avatars.githubusercontent.com/u/85175382?v=4)](https://github.com/christian-sanches "christian-sanches (6 commits)")

---

Tags

wordpresscarbon-fieldcarbon-field-slider

### Embed Badge

![Health badge](/badges/fleflis-carbon-field-slider/health.svg)

```
[![Health](https://phpackages.com/badges/fleflis-carbon-field-slider/health.svg)](https://phpackages.com/packages/fleflis-carbon-field-slider)
```

###  Alternatives

[iamntz/carbon-fields-urlpicker

Carbon Fields extension that adds a URL picker field type.

1438.6k](/packages/iamntz-carbon-fields-urlpicker)[htmlburger/carbon-field-icon

Carbon Fields extension, that adds a Icon field type.

198.7k](/packages/htmlburger-carbon-field-icon)

PHPackages © 2026

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