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

ActiveLibrary

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

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

v0.7.1(10mo ago)126.8k—6.3%11GPL-2.0-or-laterPHPPHP ^7.4 || ^8.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 1mo ago

READMEChangelogDependencies (11)Versions (9)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

43

—

FairBetter than 91% of packages

Maintenance74

Regular maintenance activity

Popularity31

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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

Recently: every ~42 days

Total

8

Last Release

311d ago

### 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 (25 commits)")[![egardner](https://avatars.githubusercontent.com/u/481828?v=4)](https://github.com/egardner "egardner (12 commits)")[![Daimona](https://avatars.githubusercontent.com/u/38216014?v=4)](https://github.com/Daimona "Daimona (7 commits)")[![umherirrender](https://avatars.githubusercontent.com/u/1174884?v=4)](https://github.com/umherirrender "umherirrender (6 commits)")[![Volker-E](https://avatars.githubusercontent.com/u/619536?v=4)](https://github.com/Volker-E "Volker-E (5 commits)")[![AnneTee](https://avatars.githubusercontent.com/u/8465998?v=4)](https://github.com/AnneTee "AnneTee (4 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (3 commits)")[![thiemowmde](https://avatars.githubusercontent.com/u/6576639?v=4)](https://github.com/thiemowmde "thiemowmde (2 commits)")[![Kabi12Blessing](https://avatars.githubusercontent.com/u/93046891?v=4)](https://github.com/Kabi12Blessing "Kabi12Blessing (2 commits)")[![jdforrester](https://avatars.githubusercontent.com/u/881572?v=4)](https://github.com/jdforrester "jdforrester (2 commits)")[![Divyaratann](https://avatars.githubusercontent.com/u/183903866?v=4)](https://github.com/Divyaratann "Divyaratann (1 commits)")[![samwilson](https://avatars.githubusercontent.com/u/213655?v=4)](https://github.com/samwilson "samwilson (1 commits)")[![va-lang](https://avatars.githubusercontent.com/u/68795808?v=4)](https://github.com/va-lang "va-lang (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

[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[openai-php/symfony

Symfony Bundle for OpenAI

215715.5k3](/packages/openai-php-symfony)[php-heroku-client/php-heroku-client

A PHP client for the Heroku Platform API

24404.8k4](/packages/php-heroku-client-php-heroku-client)[rajentrivedi/tokenizer-x

TokenizerX calculates required tokens for given prompt

91214.0k3](/packages/rajentrivedi-tokenizer-x)[qwen-php/qwen-php-client

robust and community-driven PHP SDK library for seamless integration with the qwen AI API, offering efficient access to advanced AI and data processing capabilities

213.2k1](/packages/qwen-php-qwen-php-client)

PHPackages © 2026

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