PHPackages                             sauls/widget - 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. sauls/widget

ActiveLibrary

sauls/widget
============

Simple but powerful widget system for PHP

v1.0.8(5y ago)11751MITPHPPHP &gt;=7.4CI failing

Since Feb 13Pushed 5y agoCompare

[ Source](https://github.com/sauls/widget)[ Packagist](https://packagist.org/packages/sauls/widget)[ RSS](/packages/sauls-widget/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (9)Dependencies (6)Versions (11)Used By (1)

Sauls Widget
============

[](#sauls-widget)

[![Build Status](https://camo.githubusercontent.com/5010a14c37c62c55c15a1c8ab1ad714ff696a0b1fc973ffa35b256df3c43b658/68747470733a2f2f7472617669732d63692e6f72672f7361756c732f7769646765742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sauls/widget)[![Packagist](https://camo.githubusercontent.com/ce5a9efe7fa679e34b1e50b73d71d6125dee1232ae4e3c498a564880a2945ca5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7361756c732f7769646765742e737667)](https://packagist.org/packages/sauls/widget)[![Total Downloads](https://camo.githubusercontent.com/aa184312fe85a7c7dcc486405dcf77945b4a9777346e84fbc1ea5de2a3bbc4a6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7361756c732f7769646765742e737667)](https://packagist.org/packages/sauls/widget)[![Coverage Status](https://camo.githubusercontent.com/5e05b177b77f4ca2e748c0e67e4de0bc3936e44214609b4ce8bff78304f0873b/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6769746875622f7361756c732f7769646765742e737667)](https://coveralls.io/github/sauls/widget?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/d24ef99f0c31a9042c525a704ea16a3ad259d8d0daffe73938f2741db48af56e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7361756c732f7769646765742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sauls/widget/?branch=master)[![License](https://camo.githubusercontent.com/f8ac90be01578c2a1b19561fdb505003a0c19038f7a0161a05d5e3c6b3e88c09/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7361756c732f7769646765742e737667)](https://packagist.org/packages/sauls/widget)

Simple but powerful widget system for PHP

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

[](#requirements)

PHP &gt;= 7.4 Twig ^3.0

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

[](#installation)

### Using composer

[](#using-composer)

```
$ composer require sauls/widget
```

### Apppend the composer.json file manually

[](#apppend-the-composerjson-file-manually)

```
{
    "require": {
        "sauls/widget": "^1.0"
    }
}
```

FAQ
---

[](#faq)

### What is this all about?

[](#what-is-this-all-about)

This library allows you to crate a standalone, reusable widgets that can be highly customizable for better user-interfaces.

### What it lacks?

[](#what-it-lacks)

- **Assets** - At the moment it does not have a `js` and `css` management support, but support for `js` and `css` is planned in future versions.
- **Integrations** - At the moment this library has only `twig` template engine integration.

### What is a Widget?

[](#what-is-a-widget)

Widget is a standalone, reusable and highly customizable class that can be used anywhere in the view multiple times with different configurations. There is two types of widgets:

- Widget
- ViewWidget

### What is a View?

[](#what-is-a-view)

**View** - is a class that knows how to render widget output.

### Default Views

[](#default-views)

- NullView
- StringView
- PhpFileView
- TwigView

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

[](#documentation)

> Keep in mind that this documentation is work in progress as it takes some time to properly write it. At the moment if you don't know where to start looking at the tests folder would be a good start.

### How-to`s

[](#how-tos)

- [How to create a widget?](/doc/how-to/create-widget.md)
- [How to create a view widget?](/doc/how-to/create-view-widget.md)
- How to add own dependencies to widget?
- How to create widget containing other widgets?
- How to setup and use widget factory

### Integrations

[](#integrations)

- Twig

> If you are using different template engine, and find this library useful feel free to create a pull request with your template engine integration!

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity69

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

Recently: every ~0 days

Total

10

Last Release

2091d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.2

v1.0.2PHP &gt;=7.4

### Community

Maintainers

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

---

Top Contributors

[![sauls](https://avatars.githubusercontent.com/u/7901434?v=4)](https://github.com/sauls "sauls (17 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[symfony/form

Allows to easily create, process and reuse HTML forms

2.8k152.1M2.8k](/packages/symfony-form)[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k227.1M273](/packages/sentry-sentry)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k63.6M233](/packages/nelmio-api-doc-bundle)[phpbench/phpbench

PHP Benchmarking Framework

2.0k13.0M627](/packages/phpbench-phpbench)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)

PHPackages © 2026

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