PHPackages                             innmind/ui - 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. innmind/ui

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

innmind/ui
==========

2.0.0(3mo ago)1157MITPHPPHP ~8.4CI passing

Since Oct 19Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Innmind/ui)[ Packagist](https://packagist.org/packages/innmind/ui)[ Docs](http://github.com/innmind/ui)[ RSS](/packages/innmind-ui/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (8)Used By (0)

UI
==

[](#ui)

[![CI](https://github.com/Innmind/ui/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Innmind/ui/actions/workflows/ci.yml)[![Type Coverage](https://camo.githubusercontent.com/86e9bc714e6fc56344edb0c3eab7f46dd7e173895e64ba24f04071996fb1f68a/68747470733a2f2f73686570686572642e6465762f6769746875622f696e6e6d696e642f75692f636f7665726167652e737667)](https://shepherd.dev/github/innmind/ui)

Build web pages by composing PHP components instead of writing HTML.

This is heavily inspired from [SwiftUI](https://developer.apple.com/xcode/swiftui/).

Philosophy
----------

[](#philosophy)

The goal is to have a UI system build on top of the Innmind ecosystem so it can work:

- with lazy evaluated data (such as `Sequence`s)
- asynchronously

This allows an app to work with any size of data safely. And the same app can move to an asynchronous execution mode without having to change its UI system.

This is achieved by inverting the traditional UI paradigm used in the PHP ecosystem. Instead of injecting the data into an HTML template, this package starts from the data and transform it into a list of HTML lines. With the HTML being represented as a `Sequence` it can handle any source of data.

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

[](#installation)

```
composer require innmind/ui
```

Usage
-----

[](#usage)

```
use Innmind\UI\{
    Button,
    Card,
    Grid,
    Image,
    NavigationLink,
    Shape,
    Stack,
    Text,
    Toolbar,
    Window,
};
use Innmind\Url\Url;
use Innmind\Immutable\Sequence;

$window = Window::of('Graphs', Stack::vertical(
    Toolbar::of(Text::of('Organizations'))
        ->trailing(Button::text(Url::of('/add'), '+ Add')),
    Grid::of(
        Sequence::of(...$strings)
            ->map(Text::of(...))
            ->map(static fn(Text $label) => Stack::vertical(
                Image::of(Url::of('https://avatars.githubusercontent.com/u/12136170?s=150&v=4'))
                    ->shape(Shape::circle),
                $label,
            ))
            ->map(static fn(Stack $label) => NavigationLink::of(
                Url::of('package.php'),
                $label,
            ))
            ->map(Card::of(...)),
    ),
))->stylesheet(Url::of('/themes/default.css'));

echo $window->render()->toString();
```

This would render something like this:

[![](docs/assets/example.png)](docs/assets/example.png)

Warning
-------

[](#warning)

Warning

This is NOT production ready.

This package is still experimental.

It's an attempt to build a replacement of the [macOS app](https://github.com/Innmind/macOS-tooling) hence the similarity to SwiftUI.

That being said you can still use it to build pet projects. Feedback on its API is welcome.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance82

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

3

Last Release

92d ago

Major Versions

1.1.0 → 2.0.02026-02-15

PHP version history (2 changes)1.0.0PHP ~8.2

2.0.0PHP ~8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/851425?v=4)[Baptiste Langlade](/maintainers/Baptouuuu)[@Baptouuuu](https://github.com/Baptouuuu)

---

Top Contributors

[![Baptouuuu](https://avatars.githubusercontent.com/u/851425?v=4)](https://github.com/Baptouuuu "Baptouuuu (72 commits)")

### Embed Badge

![Health badge](/badges/innmind-ui/health.svg)

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

###  Alternatives

[linnovate/openideal

OpenideaL - open source ideas and innovation management system

1262.8k2](/packages/linnovate-openideal)[innmind/object-graph

Extract object graph out of a root object

242.8k7](/packages/innmind-object-graph)[pragmatic-modules/jslayout-parser

Lightweight PHP library that was created to make work with `$jsLayout` in Magento 2 less spaghetti, and more object-oriented.

356.1k](/packages/pragmatic-modules-jslayout-parser)[innmind/git

Git abstraction

141.4k1](/packages/innmind-git)

PHPackages © 2026

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