PHPackages                             dconco/phpspa - 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. dconco/phpspa

ActiveLibrary[Framework](/categories/framework)

dconco/phpspa
=============

A component-based library for building modern, reactive user interfaces in pure PHP. Inspired by React. ✨

v2.0.11(3d ago)65517↓70%94MITPHPPHP ^8.4CI passing

Since Jun 12Pushed todayCompare

[ Source](https://github.com/dconco/phpspa)[ Packagist](https://packagist.org/packages/dconco/phpspa)[ Fund](https://www.buymeacoffee.com/dconco)[ GitHub Sponsors](https://github.com/dconco)[ RSS](/packages/dconco-phpspa/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (3)Versions (39)Used By (4)

[![PhpSPA - Component-Based PHP Library](https://camo.githubusercontent.com/8bf252dff465fc1c1ec0bd45d6378d00bd8acfa411d41a90bffe51cde31e75d2/68747470733a2f2f64636f6e636f2e746563682f7068707370612d69636f6e2e6a7067)](https://camo.githubusercontent.com/8bf252dff465fc1c1ec0bd45d6378d00bd8acfa411d41a90bffe51cde31e75d2/68747470733a2f2f64636f6e636f2e746563682f7068707370612d69636f6e2e6a7067)### *Component-Based PHP Library for Modern Web Applications*

[](#component-based-php-library-for-modern-web-applications)

**Build dynamic, interactive web applications using reusable PHP components with state management and SPA-like behavior — no JavaScript frameworks required.**

[![License](https://camo.githubusercontent.com/31e62e0eff03ce9ddfdf69d8476340d4f541990bfb152cb02a0f342965252997/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666f722d7468652d6261646765)](LICENSE)[![Documentation](https://camo.githubusercontent.com/2fa9f155c83c85b0bacc94c8df132383f2a6532c4bea47bd13154c7a71b52b25/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d72656164253230746865253230646f63732d626c75652e7376673f7374796c653d666f722d7468652d6261646765)](https://phpspa.tech)[![GitHub stars](https://camo.githubusercontent.com/f51facadce13e768bd64887be7d9f1264eb056df7cc18a6d2c1e137998d96a57/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f64636f6e636f2f7068707370613f7374796c653d666f722d7468652d626164676526636f6c6f723d79656c6c6f77)](https://github.com/dconco/phpspa)[![PHP Version](https://camo.githubusercontent.com/7c77988943c17a3b3422de2f9ac81e1d990450c0f70c5ff3e8393973110c2b14/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64636f6e636f2f7068707370613f7374796c653d666f722d7468652d626164676526636f6c6f723d707572706c65)](https://packagist.org/packages/dconco/phpspa)[![Downloads](https://camo.githubusercontent.com/b54e0112bdf39f95603a0e9a45b07a81f404970b365aa8ae5e469646d8a71e4e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64636f6e636f2f7068707370613f7374796c653d666f722d7468652d626164676526636f6c6f723d6f72616e6765)](https://packagist.org/packages/dconco/phpspa)[![PHP Tests](https://github.com/dconco/phpspa/actions/workflows/php-tests.yml/badge.svg)](https://github.com/dconco/phpspa/actions/workflows/php-tests.yml)[![PHP Version Require](https://camo.githubusercontent.com/38b22bb1e7cc6ed96f18577838184a55253b2cdf04b94057d38c891490ba6d2a/68747470733a2f2f706f7365722e707567782e6f72672f64636f6e636f2f7068707370612f726571756972652f706870)](https://packagist.org/packages/dconco/phpspa)[![Latest Stable Version](https://camo.githubusercontent.com/cc0ee31658970b45d7e7df3db7822ca93a0b6496249fa5fb8a3a382e75c09e22/68747470733a2f2f706f7365722e707567782e6f72672f64636f6e636f2f7068707370612f76)](https://packagist.org/packages/dconco/phpspa)[![Code Size](https://camo.githubusercontent.com/18852519418c9b2cbf60d0b1d7a78682841d45654c9a0dcfda50243e478ce54e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f64636f6e636f2f7068707370613f6c6162656c3d50726f6a65637425323053697a65)](https://github.com/dconco/phpspa)[![Lines of Code](https://raw.githubusercontent.com/dconco/phpspa/master/badge/loc.svg)](https://raw.githubusercontent.com/dconco/phpspa/master/badge/loc.svg)[![GitHub Language Count](https://camo.githubusercontent.com/5a8075fb6bbf7ba2cd4be68e13cfa866c548686087debc758386a711ead8511a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f756e742f64636f6e636f2f7068707370613f6c6162656c3d546f74616c2532304c616e67756167657325323055736564)](https://camo.githubusercontent.com/5a8075fb6bbf7ba2cd4be68e13cfa866c548686087debc758386a711ead8511a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f756e742f64636f6e636f2f7068707370613f6c6162656c3d546f74616c2532304c616e67756167657325323055736564)

✨ **Key Features**
------------------

[](#-key-features)

   **🧩 Components**
 *Reusable &amp; Modular*
 Build once, use everywhere   **🧠 State**
 *Reactive Updates*
 Auto-sync state changes   **⚡ Performance**
 *Zero Full Reloads*
 SPA-like experience   **🎯 Simple**
 *Minimal Setup*
 Works out of the box

---

🚀 **Getting Started**
---------------------

[](#-getting-started)

### 🎯 **Ready to Jump In? Start with our Template!**

[](#-ready-to-jump-in-start-with-our-template)

*Get up and running in 30 seconds with a complete PhpSPA example*

   **📦 Clone Template**
 *Pre-configured project structure*   **⚡ Instant Setup**
 *Dependencies + server ready*  **Step 1: Clone the Template**

```
composer create-project phpspa/phpspa my-phpspa-app
cd my-phpspa-app
```

**Step 3: Start Development Server**

```
composer start
```

🎉 **That's it!** Your PhpSPA application is now running locally.

**Open your browser and start building amazing components!**

---

### 🚀 **Quick Start**

[](#-quick-start)

If you want to set up PhpSPA manually, maybe in an existing project, follow these steps:

#### Install

[](#install)

```
composer require dconco/phpspa
```

#### Namespace

[](#namespace)

First you need to include the namespace at the beginning of your app.

```
