PHPackages                             phpfui/phpfui - 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. phpfui/phpfui

ActiveLibrary[Framework](/categories/framework)

phpfui/phpfui
=============

PHP Object Oriented Wrapper for the Foundation CSS Framework

V6.4.0(2mo ago)82.4k—0%1[1 PRs](https://github.com/phpfui/phpfui/pulls)1MITPHPPHP &gt;=8.1 &lt;8.6CI passing

Since Oct 21Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/phpfui/phpfui)[ Packagist](https://packagist.org/packages/phpfui/phpfui)[ Docs](http://www.phpfui.com)[ RSS](/packages/phpfui-phpfui/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (24)Versions (128)Used By (1)

PHPFUI [![Tests](https://github.com/phpfui/phpfui/actions/workflows/tests.yml/badge.svg)](https://github.com/phpfui/phpfui/actions?query=workflow%3Atests) [![Latest Packagist release](https://camo.githubusercontent.com/10ca184c7d726a521a4b740f291e76e7c20dc58ec06ba41b5b421b5e530e2d1b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068706675692f7068706675692e737667)](https://packagist.org/packages/phpfui/phpfui) [![](https://camo.githubusercontent.com/742e8be8005b1fe76a64a5d8f5e6a5d4f63bf315e9a44a6d23e4e11c76b0555f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230362d627269676874677265656e2e7376673f7374796c653d666c6174)](https://camo.githubusercontent.com/742e8be8005b1fe76a64a5d8f5e6a5d4f63bf315e9a44a6d23e4e11c76b0555f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230362d627269676874677265656e2e7376673f7374796c653d666c6174)
==========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#phpfui---)

PHP Wrapper for the Foundation CSS Framework

**PHPFUI**, **PHP** **F**oundation **U**ser **I**nterface, is a [modern](#php-versions) PHP library that produces HTML formated for [Foundation](https://get.foundation/sites/docs/). It does everything you need for a fully functional Foundation page, with the power of an OO language. It currently uses Foundation 6.6.

> "I was surprised that people were prepared to write HTML. In my initial requirements for this thing, I had assumed, as an absolute pre-condition, that nobody would have to do HTML or deal with URLs. If you use the original World Wide Web program, you never see a URL or have to deal with HTML. You're presented with the raw information. You then input more information. So you are linking information to information--like using a word processor. That was a surprise to me--that people were prepared to painstakingly write HTML."

[Sir Tim Berners-Lee, inventor of the World Wide Web](http://web.archive.org/web/20050831085206/http://www.w3journal.com/3/s1.interview.html)

Using PHPFUI for view output will produce 100% valid HTML and insulate you from future changes to Foundation, your custom HMTL layouts, CSS and JS library changes. You write to an abstract concept (I want a checkbox here), and the library will output a checkbox formatted for Foundation. You can inherit from CheckBox and add your own take on a checkbox, and when the graphic designer decides they have the most awesome checkbox ever, you simply change your CheckBox class, and it is changed on every page system wide.

Don't write HTML by hand!

Usage
-----

[](#usage)

```
namespace PHPFUI;
$page = new Page();
$form = new Form($page);
$fieldset = new FieldSet('A basic input form');
$time = new Input\Time($page, 'time', 'Enter A Time in 15 minute increments');
$time->setRequired();
$date = new Input\Date($page, 'date', 'Pick A Date');
$fieldset->add(new MultiColumn($time, $date));
$fieldset->add(new Input\TextArea('text', 'Enter some text'));
$fieldset->add(new Submit());
$form->add($fieldset);
$page->add($form);
$page->addStyleSheet('/css/styles.css');
echo $page;
```

Installation Instructions
-------------------------

[](#installation-instructions)

```
composer require phpfui/phpfui

```

Then run **update.php** from the vendor/phpfui/phpfui directory and supply the path to your public directory / the directory for the various JS and CSS files PHPFUI uses. This will copy all required public files into your public directory. For example:

```
php vendor/phpfui/phpfui/update.php public/PHPFUI

```

The PHPFUI library defaults to your-public-directory/PHPFUI, it can be overridden, but it is suggested to use PHPFUI to keep everything in one place. **update.php** should be run when ever you update PHPFUI.

Versioning
----------

[](#versioning)

Versioning will match the [Foundation versions](https://github.com/foundation/foundation-sites/releases) for Major semantic versions. PHPUI will always support the most recent version of Foundation possible for the Major version. PHPFUI Minor version will include breaking changes and may incorporate changes for the latest version of Foundation. The PHPFUI Patch version will include non breaking changes or additions. So PHPFUI Version 6.0.0 would be the first version of the library, 6.0.1 would be the first patch of PHPFUI. Both should work with any Foundation 6.x version. PHPFUI 6.1.0 will track PHP 7.4 - 8.1, 6.2.0 will track 8.0 - 8.2, but both will still track Foundation 6.x. PHPFUI 7.0.0 would track Foundation 7.x series on currently supported versions of PHP.

Depreciation and Foundation changes
-----------------------------------

[](#depreciation-and-foundation-changes)

Since major versions of Foundation have in the past depreciated and obsoleted things, PHPFUI will track the latest version of Foundation for class names and functionality. However, when Foundation makes a breaking change or removes something, PHPFUI will continue to support the old functionality as best as possible in the new Foundation framework. Depreciated classes will be put in the \\PHPFUI\\Vx namespace (where x would be the prior Major Foundation version containing that feature). So if something gets depreciated in a newer version of Foundation, you simply will need to change your code from \\PHPFUI\\Example to \\PHPFUI\\V6\\Example. The depreciated namespace will only be supported for one Major version of PHPFUI, so it is recommended you migrate off of it in a timely manor.

Full Class Documentation
------------------------

[](#full-class-documentation)

[PHPFUI/InstaDoc](http://phpfui.com/?n=PHPFUI)

Live Examples
-------------

[](#live-examples)

Via [PHPFUI/Examples](http://phpfui.com/Examples/index.php)

Unit Testing
------------

[](#unit-testing)

Full unit testing using [phpfui/html-unit-tester](https://packagist.org/packages/phpfui/html-unit-tester)

License
-------

[](#license)

PHPFUI is distributed under the MIT License.

### PHP Versions

[](#php-versions)

This library only supports **modern** versions of PHP which still receive security updates. While we would love to support PHP from the late Ming Dynasty, the advantages of modern PHP versions far out weigh quaint notions of backward compatibility. Time to upgrade.

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance88

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity93

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 99.4% 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 ~19 days

Recently: every ~58 days

Total

124

Last Release

60d ago

PHP version history (9 changes)V6.0.0PHP &gt;=7.1

V6.0.56PHP &gt;=7.3

V6.0.75PHP &gt;=7.4 &lt;8.2

V6.2.0PHP &gt;=8.0 &lt;8.2

V6.2.3PHP &gt;=8.0 &lt;8.3

V6.2.17PHP &gt;=8.0 &lt;8.4

V6.3.0PHP &gt;=8.1 &lt;8.4

V6.3.3PHP &gt;=8.1 &lt;8.5

V6.3.9PHP &gt;=8.1 &lt;8.6

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7434059?v=4)[Bruce Wells](/maintainers/PHPFUI)[@phpfui](https://github.com/phpfui)

---

Top Contributors

[![phpfui](https://avatars.githubusercontent.com/u/7434059?v=4)](https://github.com/phpfui "phpfui (334 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

cssfoundation6htmlobject-orientedphpphp-wrapperresponsiveui-componentsphpframeworkcssuihtmlscssfoundationresponsiveobject oriented

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[zurb/foundation

The most advanced responsive front-end framework in the world.

29.8k380.2k15](/packages/zurb-foundation)[foundation/foundation-sites

The most advanced responsive front-end framework in the world.

29.8k8.4k](/packages/foundation-foundation-sites)[components/bootstrap

The most popular front-end framework for developing responsive, mobile first projects on the web.

932.8M63](/packages/components-bootstrap)[krzysiekpiasecki/gentelella

A Symfony skeleton application with user account functionality based on the Twitter Bootstrap and Gentelella template

991.8k](/packages/krzysiekpiasecki-gentelella)

PHPackages © 2026

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