PHPackages                             desertsnowman/uix - 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. [Framework](/categories/framework)
4. /
5. desertsnowman/uix

ActiveWordpress-framework[Framework](/categories/framework)

desertsnowman/uix
=================

UI framework for WordPress Plugins

v2.0(8y ago)3127GPL-2.0+

Since Dec 15Compare

[ Source](https://github.com/DavidCramer/uix)[ Packagist](https://packagist.org/packages/desertsnowman/uix)[ RSS](/packages/desertsnowman-uix/feed)WikiDiscussions Synced today

READMEChangelog (1)DependenciesVersions (6)Used By (0)

UIX
===

[](#uix)

[![Travis](https://camo.githubusercontent.com/668d3d19096f367e8b18bc6912fa6704b928f450028506d5c8c870804b54885e/68747470733a2f2f6170692e7472617669732d63692e6f72672f44617669644372616d65722f7569782e7376673f6272616e63683d646576656c6f70)](https://travis-ci.org/DavidCramer/uix/)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/99c5710caabf042cac8cc10990302edcd13a87a4ae5c3b3fc2b5a5a4ff08673a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f44617669644372616d65722f7569782f6261646765732f7175616c6974792d73636f72652e706e673f623d646576656c6f70)](https://scrutinizer-ci.com/g/DavidCramer/uix/?branch=develop)[![CodeFactor](https://camo.githubusercontent.com/9d01f47490bc362e39baea92477c8ca9870835a612d8298236aea5fedbafac65/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f64617669646372616d65722f7569782f6261646765)](https://www.codefactor.io/repository/github/davidcramer/uix)[![Code Coverage](https://camo.githubusercontent.com/ce14bff474351a87049e7fc3422676f0eac15f9d04e4044fa5d79a0ae63df859/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f44617669644372616d65722f7569782f6261646765732f636f7665726167652e706e673f623d646576656c6f70)](https://scrutinizer-ci.com/g/DavidCramer/uix/?branch=develop)

UIX is a small framework for creating user interfaces ( Post Types, Settings Pages, and Metaboxes ) and config structures with the least code possible. It only handles the UI. The program logic is up to you.

Documentation
-------------

[](#documentation)

Important note is that UIX used namespacing so it is PHP 5.3+. It's also heavy in development, so treat this as a `BETA`.

### Installation

[](#installation)

Currently using it as a WordPress plugin is the only reliable way to use it.

- A Composer method will be included soon.
- Grunt process will be updated and be available again.

Registration
------------

[](#registration)

UIX has a `uix()` helper function you can use to add UI objects as needed, or it can auto load UI structures from a defined UI folder.

### Helper Function

[](#helper-function)

The helper function makes it easy to add UI structures quickly.

```
$employees = uix()->add( 'post_type', 'employees', array(
    'settings' => array(
        'label'                 => __( 'Employee', 'text-domain' ),
        'description'           => __( 'Employees Post Type', 'text-domain' ),
        'labels'                => array(
            'name'                  => _x( 'Employees', 'Post Type General Name', 'text-domain' ),
            'singular_name'         => _x( 'Employee', 'Post Type Singular Name', 'text-domain' ),
            'menu_name'             => __( 'Employees', 'text-domain' ),
            'name_admin_bar'        => __( 'Employee', 'text-domain' ),
        ),
        'supports'              => array( 'title' ),
        'public'                => true,
        'menu_name'             => 'Employees',
        'menu_icon'             => 'dashicons-menu',
    ),
));
```

Now `$employees` is the UI object created. From here you just leave it and your post type is registered. However, you can also add metaboxes to the object like this:

```
$metabox = $employees->metabox( 'meta_fields', array(
    'name'              =>  esc_html__( 'Metabox Fields', 'text-domain' ),
    'context'           =>  'normal',
    'priority'          =>  'high',
));
```

This adds a `Metabox Fields` meta box to the post type. You'll need to have some sections and controls for the metabox to be useful, so you can add them to the metabox object:

```
$metabox->section( 'employee_details', array(
    'label' => esc_html__( 'Employee Details', 'text-domain' ),
))->control( 'employee_name', array(
    'label' => esc_html__( 'Name', 'text-domain' ),
))->parent->control( 'employee_bio', array(
    'label' => esc_html__( 'Bio', 'text-domain' ),
    'type' => 'textarea'
));
```

### Autoloading

[](#autoloading)

You can register a folder for UIX to scan and auto load any structures it finds. This means that you don't need ever write registraion code to make stuff happen.

There is a `uix_register` hook that will allow you to register the folder location where the definition files are kept. You can use it like this:

```
function register_ui_folders( $uix ){
    $uix->register( plugin_dir_path( __FILE__ ) . 'includes/ui' );
}
add_action( 'uix_register', 'register_ui_folders' );
```

The path registered should have folders of each type of UI object and contain fields defining the UI structure:

```
ui/
├── metabox/
│   ├── user_fields.php
│   └── post_meta.php
├── post_type/
│   ├── portfolio.php
│   └── employees.php
└── page/
    └── my_settings.php

```

The file needs to return an array structure of the objects to auto load. The `ui/employees.php` mentioned above, could look like this:

```
$post_type = array(
    'post_type_slug' => array(
        'settings' => array(
            'label'                 => __( 'Employee', 'text-domain' ),
            'description'           => __( 'Employees Post Type', 'text-domain' ),
            'labels'                => array(
                'name'                  => _x( 'Employees', 'Post Type General Name', 'text-domain' ),
                'singular_name'         => _x( 'Employee', 'Post Type Singular Name', 'text-domain' ),
                'menu_name'             => __( 'Employees', 'text-domain' ),
                'name_admin_bar'        => __( 'Employee', 'text-domain' ),
            ),
            'supports'              => array( 'title' ),
            'public'                => true,
            'menu_name'             => 'Employees',
            'menu_icon'             => 'dashicons-menu',
        ),
        'metabox'                   => array(
            'meta_fields'           =>  array(
                'name'              =>  esc_html__( 'Metabox Fields', 'text-domain' ),
                'context'           =>  'normal',
                'priority'          =>  'high',
                'section'               =>  array(
                    'employee_details'  =>  array(
                        'label'         =>  esc_html__( 'Employee Details', 'text-domain' ),
                        'control'       =>  array(
                            'employee_name' =>  array(
                                'label'     => esc_html__( 'Name', 'text-domain' ),
                            ),
                            'employee_bio'    =>  array(
                                'label' => esc_html__( 'Bio', 'text-domain' ),
                                'type' => 'textarea'
                            ),
                        ),
                    ),
                ),
            ),
        ),
    ),
);
return $post_type;
```

This will create and register the post type automatically on load, including the metabox and controls attached.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 99.6% 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

Unknown

Total

1

Last Release

2931d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3dca73b90314a3ca416a2c66de5e87f4e195e7dc3d3a2fb55263d1d78b188154?d=identicon)[Desertsnowman](/maintainers/Desertsnowman)

---

Top Contributors

[![DavidCramer](https://avatars.githubusercontent.com/u/307466?v=4)](https://github.com/DavidCramer "DavidCramer (463 commits)")[![tripflex](https://avatars.githubusercontent.com/u/553732?v=4)](https://github.com/tripflex "tripflex (2 commits)")

---

Tags

frameworkwordpressui

### Embed Badge

![Health badge](/badges/desertsnowman-uix/health.svg)

```
[![Health](https://phpackages.com/badges/desertsnowman-uix/health.svg)](https://phpackages.com/packages/desertsnowman-uix)
```

###  Alternatives

[themosis/theme

The Themosis framework boilerplate theme.

10349.0k3](/packages/themosis-theme)[alleyinteractive/pest-plugin-wordpress

WordPress Pest Integration

273.9k1](/packages/alleyinteractive-pest-plugin-wordpress)[wpstarter/framework

The WpStarter Framework - Laravel Framework for WordPress

1610.2k5](/packages/wpstarter-framework)

PHPackages © 2026

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