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

ActiveLibrary[Framework](/categories/framework)

w4/ui-framework
===============

UI Abstraction Layer &amp; Theme Engine for Laravel

v0.3.1(3mo ago)01↑2900%MITPHPPHP ^8.3

Since Mar 28Pushed 1mo agoCompare

[ Source](https://github.com/Sagat1200/W4-UI-Framework)[ Packagist](https://packagist.org/packages/w4/ui-framework)[ RSS](/packages/w4-ui-framework/feed)WikiDiscussions main Synced 3mo ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

W4 UI Framework
===============

[](#w4-ui-framework)

Paquete de abstraccion y contruccion de componentes de usuario y gestor de temas para Laravel PHP.

¿Qué incluye?
-------------

[](#qué-incluye)

- Registro de componentes por alias (`button`, `input`).
- Pipeline de renderizado (`theme resolver` + `renderer`).
- Temas incluidos:
    - `w4native`
- Renderer incluido:
    - `blade`
- Helpers globales:
    - `w4_render(...)`
    - `w4_view(...)`
    - `w4_payload(...)`
- Componentes Blade:
    - ``
    - ``
    - ``

Requisitos
----------

[](#requisitos)

- PHP `^8.3`
- Laravel `^13.0`

Instalación
-----------

[](#instalación)

```
composer require w4/ui-framework
```

Publicar configuración:

```
php artisan vendor:publish --tag=w4-ui-config
```

Configuración
-------------

[](#configuración)

Archivo: `config/w4-ui-framework.php`

```
return [
    'theme' => env('W4_UI_THEME', 'w4native'),
    'renderer' => env('W4_UI_RENDERER', 'blade'),
];
```

Variables de entorno:

```
W4_UI_THEME=w4native
W4_UI_RENDERER=blade
```

Tema soportado actualmente:

- `w4native`

Uso rápido
----------

[](#uso-rápido)

### 1) Core component + helper

[](#1-core-component--helper)

```
use W4\UI\Framework\Components\UI\Button\Button;

echo w4_render(
    Button::make('Guardar')
        ->theme('w4native')
        ->variant('primary')
);
```

### 2) Facade

[](#2-facade)

```
use W4\UI\Framework\Components\Forms\Input\Input;
use W4\UI\Framework\Facades\W4UI;

echo W4UI::render(
    Input::make('Correo')
        ->name('email')
        ->type('email')
        ->theme('w4native')
);
```

### 3) Blade components

[](#3-blade-components)

```

```

API de salida
-------------

[](#api-de-salida)

`w4_payload(...)` retorna una estructura normalizada para inspección o integración:

```
[
  'renderer' => 'blade',
  'view' => 'w4-ui::components....',
  'component' => 'button|input',
  'data' => [...],
  'theme' => [
    'classes' => [...],
    'attributes' => [...],
  ],
]
```

Estado y eventos
----------------

[](#estado-y-eventos)

El paquete maneja estado por componente con state machine.

Ejemplo (Button):

```
use W4\UiFramework\Components\UI\Button\Button;
use W4\UiFramework\Components\UI\Button\ButtonComponentEvent;

$button = Button::make('Enviar')
    ->dispatch(ButtonComponentEvent::START_LOADING);
```

Ejemplo (Input):

```
use W4\UiFramework\Components\Forms\Input\Input;
use W4\UiFramework\Components\Forms\Input\InputComponentEvent;

$input = Input::make('Correo')
    ->dispatch(InputComponentEvent::SET_INVALID);
```

Tema global vs tema por componente
----------------------------------

[](#tema-global-vs-tema-por-componente)

- Si `W4_UI_THEME=w4native`, no necesitas definir `theme="w4native"` en cada componente.
- Define `theme` por componente cuando quieras forzar un tema puntual.

Vistas Blade
------------

[](#vistas-blade)

El paquete carga vistas con namespace:

- `w4-ui::...`

Componentes y wrappers Blade registrados:

- `w4-render`
- `w4-button`
- `w4-input`

Pruebas
-------

[](#pruebas)

```
composer test
```

Estructura principal (referencia rápida)
----------------------------------------

[](#estructura-principal-referencia-rápida)

- `src/Providers/W4UiFrameworkServiceProvider.php`
- `src/Support/W4UiManager.php`
- `src/Renderers/BladeRenderer.php`
- `src/Themes/W4Native/*`
- `src/View/Components/*`
- `src/Helpers/helpers.php`

Licencia
--------

[](#licencia)

MIT

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance86

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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

Total

3

Last Release

91d ago

PHP version history (2 changes)0.1.0PHP ^8.2

v0.3.1PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/71e4b51defbd104cb8a6e5dcbf93488a4e0ff856037dd48498e446e472c5fa55?d=identicon)[FranciscoW4](/maintainers/FranciscoW4)

---

Top Contributors

[![Sagat1200](https://avatars.githubusercontent.com/u/105411569?v=4)](https://github.com/Sagat1200 "Sagat1200 (122 commits)")

---

Tags

laravellivewirebootstrapreactjstailwindcssDaisyUIVue.jsui frameworkw4-software

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.1k91.3M280](/packages/laravel-horizon)[laravel-frontend-presets/tall

TALL preset for Laravel.

2.6k716.5k1](/packages/laravel-frontend-presets-tall)[laravel/ai

The official AI SDK for Laravel.

1.0k2.1M162](/packages/laravel-ai)

PHPackages © 2026

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