PHPackages                             wikimedia/codex - 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. wikimedia/codex

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

wikimedia/codex
===============

A PHP library for building HTML and CSS UI components using Codex, the Wikimedia design system.

v0.8.0(2mo ago)141.4k—8.7%11GPL-2.0-or-laterPHPPHP &gt;=8.2.0

Since Oct 27Pushed 1mo ago20 watchersCompare

[ Source](https://github.com/wikimedia/design-codex-php)[ Packagist](https://packagist.org/packages/wikimedia/codex)[ Docs](https://doc.wikimedia.org/codex/)[ RSS](/packages/wikimedia-codex/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (22)Versions (10)Used By (1)

Wikimedia Codex
===============

[](#wikimedia-codex)

A PHP library for building HTML and CSS UI components using [Codex](https://doc.wikimedia.org/codex/main/), the Wikimedia design system.

[![Latest Stable Version](https://camo.githubusercontent.com/f01e76f3fa1b367a374ae11f4ed20ea731cac9a6d846d3ef5e04f241c6c8890a/68747470733a2f2f706f7365722e707567782e6f72672f77696b696d656469612f636f6465782f763f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/wikimedia/codex)[![Latest Unstable Version](https://camo.githubusercontent.com/3868a562ca7a38efa696544c8c86829d7e412bf0b396346355da197ff1ca96ba/68747470733a2f2f706f7365722e707567782e6f72672f77696b696d656469612f636f6465782f762f756e737461626c653f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/wikimedia/codex)[![License](https://camo.githubusercontent.com/894151c9369cbbf2358b0fe5d3a226a492e621399acb10be9db9e17df9ace763/68747470733a2f2f706f7365722e707567782e6f72672f77696b696d656469612f636f6465782f6c6963656e73653f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/wikimedia/codex)[![PHP Version Require](https://camo.githubusercontent.com/763cf9378f2b0bebdfecd5ec8b9e32ec3a4c3d2d3e7520bdb13d3ead7f3614d0/68747470733a2f2f706f7365722e707567782e6f72672f77696b696d656469612f636f6465782f726571756972652f7068703f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/wikimedia/codex)

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

[](#installation)

Use Composer to install the Codex library:

```
composer require wikimedia/codex
```

Components
----------

[](#components)

The Codex library provides a variety of components to build UI:

- **Accordion**: A collapsible and expandable section for organizing content.
- **Button**: A clickable button that can be styled to reflect different actions.
- **Card**: A component for grouping information and actions related to a single topic.
- **Checkbox**: A form element that allows users to select one or more options.
- **Field**: A container for grouping form elements with optional legend and help a text.
- **InfoChip**: A small component used to display brief information or tags.
- **Label**: A component used to label other form elements.
- **Message**: A component to display information, warnings, or errors to users.
- **Pager**: A component for navigating through pages of data.
- **ProgressBar**: A visual indicator of progress toward a goal or task completion.
- **Radio**: A form element that allows users to select one option from a set.
- **Select**: A dropdown component that allows users to select an option from a list.
- **Table**: A component for arranging data in rows and columns.
- **Tabs**: A component that organizes content into multiple panels with selectable tabs.
- **TextArea**: A multi-line text input field for user input.
- **TextInput**: A single-line text input field for user input.
- **Thumbnail**: A visual component for displaying small preview images.
- **ToggleSwitch**: A ToggleSwitch enables the user to instantly toggle between on and off states.

Usage
-----

[](#usage)

Here is a basic example of how to use the Codex library:

```

```

Scripts
-------

[](#scripts)

The following scripts are defined for testing and code fixing purposes:

- `test`: Run linting and code checks.
- `fix`: Automatically fix code style issues.
- `phan`: Run the Phan static analyzer.
- `phpcs`: Run the PHP Code Sniffer.
- `start-sandbox`: Start the sandbox environment for testing.
- `update-snapshots`: Update the snapshot tests. Run this if the snapshot tests fail but the change in output was intentional.

Example usage:

```
composer run-script test
composer run-script fix
composer run-script phan
composer run-script phpcs
composer run-script start-sandbox
```

License
-------

[](#license)

This project is licensed under the GPL-2.0-or-later. See the [LICENSE](LICENSE) file for details.

Contributing
------------

[](#contributing)

Please read the [CONTRIBUTING](CONTRIBUTING.md) file for details on our code of conduct, and the process for submitting pull requests to us.

Bugs
----

[](#bugs)

Report bugs at [Phabricator](https://phabricator.wikimedia.org/tag/codex/).

Homepage
--------

[](#homepage)

For more information, visit the [homepage](https://doc.wikimedia.org/codex/).

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance87

Actively maintained with recent releases

Popularity32

Limited adoption so far

Community29

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~111 days

Total

9

Last Release

66d ago

PHP version history (2 changes)0.1.0PHP ^7.4 || ^8.0

v0.8.0PHP &gt;=8.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b94d9718c06ec7c3fd7a104bc44966fb7464b9ec7411582343ea35a7a6a85f08?d=identicon)[mediawiki](/maintainers/mediawiki)

![](https://www.gravatar.com/avatar/716c86d71cbf921e7912a505f89d799de398fc0a3af0bd4c8862834b2d642bd7?d=identicon)[wikimedia](/maintainers/wikimedia)

---

Top Contributors

[![doguabaris](https://avatars.githubusercontent.com/u/135986694?v=4)](https://github.com/doguabaris "doguabaris (55 commits)")[![catrope](https://avatars.githubusercontent.com/u/260792?v=4)](https://github.com/catrope "catrope (30 commits)")[![egardner](https://avatars.githubusercontent.com/u/481828?v=4)](https://github.com/egardner "egardner (12 commits)")[![umherirrender](https://avatars.githubusercontent.com/u/1174884?v=4)](https://github.com/umherirrender "umherirrender (9 commits)")[![Daimona](https://avatars.githubusercontent.com/u/38216014?v=4)](https://github.com/Daimona "Daimona (7 commits)")[![Volker-E](https://avatars.githubusercontent.com/u/619536?v=4)](https://github.com/Volker-E "Volker-E (7 commits)")[![AnneTee](https://avatars.githubusercontent.com/u/8465998?v=4)](https://github.com/AnneTee "AnneTee (4 commits)")[![Kabi12Blessing](https://avatars.githubusercontent.com/u/93046891?v=4)](https://github.com/Kabi12Blessing "Kabi12Blessing (4 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (3 commits)")[![va-lang](https://avatars.githubusercontent.com/u/68795808?v=4)](https://github.com/va-lang "va-lang (3 commits)")[![thiemowmde](https://avatars.githubusercontent.com/u/6576639?v=4)](https://github.com/thiemowmde "thiemowmde (2 commits)")[![jdforrester](https://avatars.githubusercontent.com/u/881572?v=4)](https://github.com/jdforrester "jdforrester (2 commits)")[![samwilson](https://avatars.githubusercontent.com/u/213655?v=4)](https://github.com/samwilson "samwilson (1 commits)")[![Divyaratann](https://avatars.githubusercontent.com/u/183903866?v=4)](https://github.com/Divyaratann "Divyaratann (1 commits)")[![rovertrack](https://avatars.githubusercontent.com/u/160643895?v=4)](https://github.com/rovertrack "rovertrack (1 commits)")[![somechris](https://avatars.githubusercontent.com/u/3330451?v=4)](https://github.com/somechris "somechris (1 commits)")

---

Tags

codexWikimedia

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wikimedia-codex/health.svg)

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

346132.9M112](/packages/google-cloud-core)[toin0u/geocoder-laravel

Geocoder Service Provider for Laravel

7615.4M17](/packages/toin0u-geocoder-laravel)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[oat-sa/tao-core

TAO core extension

66143.7k122](/packages/oat-sa-tao-core)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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