PHPackages                             view-components/view-components - 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. [Templating &amp; Views](/categories/templating)
4. /
5. view-components/view-components

ActiveLibrary[Templating &amp; Views](/categories/templating)

view-components/view-components
===============================

Flexible Framework-Agnostic UI for Enterprise Web Applications

v0.26.9(4y ago)2498.7k↓16.9%3[16 issues](https://github.com/view-components/view-components/issues)[1 PRs](https://github.com/view-components/view-components/pulls)7MITPHPPHP ^5.5||^7||^8

Since Apr 22Pushed 4y ago7 watchersCompare

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

READMEChangelog (10)Dependencies (7)Versions (73)Used By (7)

[![Logo](https://raw.githubusercontent.com/view-components/logo/master/view-components-logo-without-text-42.png)](https://raw.githubusercontent.com/view-components/logo/master/view-components-logo-without-text-42.png) PHP View Components
=============================================================================================================================================================================================================================================

[](#-php-view-components)

### `Flexible Framework-Agnostic UI for Enterprise Web Applications`

[](#flexible-framework-agnostic-ui-for-enterprise-web-applications)

[![Release](https://camo.githubusercontent.com/ec04e46b889e3cc367d3b963b8f7ace2819a056f85c6127c521421d534b39d9b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f766965772d636f6d706f6e656e74732f766965772d636f6d706f6e656e74732e737667)](https://packagist.org/packages/view-components/view-components)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1399d7871cebaeced05e97140c8fac8b363df1d2bf9ca9ea4bf01ae3020f01b7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f766965772d636f6d706f6e656e74732f766965772d636f6d706f6e656e74732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/view-components/view-components/?branch=master)[![Build Status](https://camo.githubusercontent.com/0e034895154f7f8c870f5fc686240bd84ea49077a7787a54731fc6c7b1dec1b2/68747470733a2f2f7472617669732d63692e6f72672f766965772d636f6d706f6e656e74732f766965772d636f6d706f6e656e74732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/view-components/view-components)[![Code Coverage](https://camo.githubusercontent.com/2426b0d39d52977a457b5ff4185dd0e83e974fd26206e3c2d20b92f2c2d26628/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f766965772d636f6d706f6e656e74732f766965772d636f6d706f6e656e74732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/view-components/view-components/?branch=master)

**Project status: alpha since 2016-08-12**

**Have questions? [Ask in issue-tracker](https://github.com/view-components/view-components/issues/new)**.

Table of Contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
    - [Installing into Existing Project](#installing-into-existing-project)
    - [Installing as Stand-alone Project](#installing-as-stand-alone-project)
- [Demo Application](#demo-application)
    - [Working Demo](#working-demo)
    - [Running Demo Application Locally](#running-demo-application-locally)
- [Documentation](#documentation)
- [Testing](#testing)
- [Contributing](#contributing)
- [Security](#security)
- [License](#license)

Requirements
------------

[](#requirements)

- PHP 5.5+ (hhvm &amp; php7 are supported)

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

[](#installation)

#### Installing into Existing Project

[](#installing-into-existing-project)

The recommended way of installing the component is through [Composer](https://getcomposer.org).

Run following command from your project folder:

```
composer require view-components/view-components
```

#### Installing as Stand-alone Project

[](#installing-as-stand-alone-project)

For running tests and demo-application bundled with this package on your system you need to install it as stand-alone project.

```
composer create-project view-components/view-components

```

This is the equivalent of doing a git clone followed by a "composer install" of the vendors. Composer will automatically run 'post-create-project-cmd' command and that will call interactive installation.

If you want to use default settings and run it silently, just add `--no-interaction` option.

If you already cloned this repository, or you want to reinstall the package, navigate to the package folder and run `composer create-project` command without specifying package name.

If you are sure that you don't need to reinstall composer dependencies, you can execute only bundled installer: `composer run post-create-project-cmd`

This kind of installation has additional requirements:

- ext-curl
- ext-pdo\_sqlite

Demo Application
----------------

[](#demo-application)

This package bundled with demo-application.

Souce code of demos available [here](https://github.com/view-components/view-components/blob/master/tests/webapp/Controller.php)

#### Working Demo

[](#working-demo)

Travis CI automatically deploys web-application bundled with this package to Heroku.

Here you can see working demos:

*First run may be slow because Heroku shutting down workers when there is no traffic and starts it again on first visit*

#### Running Demo Application Locally

[](#running-demo-application-locally)

To run it locally, you must install this package as stand-alone project with dev-dependencis.

Then, run web-server from the package directory with the following command:

```
composer serve

```

This command uses web-server bundled with PHP.

Now, open  in the browser (for Windows users it will be opened automatically after starting web-server).

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

[](#documentation)

- [Components Overview](https://github.com/view-components/view-components/blob/master/doc/components.md)
- [Cookbook](https://github.com/view-components/view-components/blob/master/doc/cookbook.md)

**Work in progress. Contributions are extremely welcome!**

Testing
-------

[](#testing)

This application bundled with unit and acceptance tests created with PHPUnit.

To run tests locally, you must install this package as stand-alone project with dev-dependencies.

Command for running unit and acceptance tests:

```
composer test
```

Command for checking code style:

```
composer cs
```

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

[](#contributing)

Please see [Contributing Guidelines](contributing.md) and [Code of Conduct](code_of_conduct.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

© 2014—2016 Vitalii Stepanenko

Licensed under the MIT License.

Please see [License File](LICENSE) for more information.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 99.1% 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 ~32 days

Recently: every ~446 days

Total

71

Last Release

1777d ago

PHP version history (5 changes)v0.1.0PHP &gt;=5.4.0

v0.4.0PHP &gt;=5.5.0

v0.21.9PHP ^5.4||^7

v0.21.10PHP ^5.5||^7

v0.26.9PHP ^5.5||^7||^8

### Community

Maintainers

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

---

Top Contributors

[![Nayjest](https://avatars.githubusercontent.com/u/153999?v=4)](https://github.com/Nayjest "Nayjest (645 commits)")[![globotech-acc](https://avatars.githubusercontent.com/u/10062496?v=4)](https://github.com/globotech-acc "globotech-acc (5 commits)")[![hexusdev](https://avatars.githubusercontent.com/u/8880373?v=4)](https://github.com/hexusdev "hexusdev (1 commits)")

---

Tags

htmlviewpresenterwidgetsRendering

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[laracasts/presenter

Simple view presenters

8643.4M46](/packages/laracasts-presenter)[laminas/laminas-view

Fast and type safe HTML templating library with a flexible plugin system supporting multistep template composition

7526.3M230](/packages/laminas-laminas-view)[guilhermegonzaga/presenter

Implementation for Laravel of the presenter design pattern.

47242.1k](/packages/guilhermegonzaga-presenter)[ogheo/yii2-htmlcompress

Compress HTML output into a single line

20184.4k1](/packages/ogheo-yii2-htmlcompress)[lewis/presenter

Simple view presenter library for Laravel.

174.7k](/packages/lewis-presenter)[deefour/presenter

Presenters/Decorators for PHP Objects

122.5k](/packages/deefour-presenter)

PHPackages © 2026

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