0.5
Before 1.0: the API may still change between minor versions
Interactive pages, without leaving PHP.
Keep state and actions in a PHP class. Reactive sends each change to the server, which checks it and renders HTML; the page updates in place. No JavaScript to write, no build step on your host.
Read the docs
composer require hostkurd/flocms-reactive
final class ProductTable extends Component
{
#[State(rules: 'max:100', query: 'q')]
public string $search = '';
#[Action]
public function clear(): void
{
$this->search = '';
}
public function render(): string
{
return $this->view(ROOT . '/views/components/products.html', [
'products' => Product::search($this->search),
]);
}
}
<input type="search" data-rx-bind="search">
<button data-rx-action="clear">Clear</button>
The result. Try typing: this demo filters in your browser.
POST /en/flo-reactive/update · 200 · 6 rows
- Brass desk lamp
$89 - Oak dining chair
$145 - Floor lamp, linen shade
$210 - Wool rug, 2 × 3 m
$380 - Lounge chair
$640 - Pendant lamp
$120 - No products match.
/shop?catalog_q=
How it works
The server stays in charge.
- 1Someone types or clicksA bound input or an action button sends the change, by default 300 ms after typing stops.
- 2The state is checkedThe snapshot is HMAC-signed and tied to the session. Only declared properties and actions are accepted.
- 3PHP runs the actionauthorize(), the field rules and validate() run first. Invalid input answers 422 with the errors.
- 4HTML comes backThe component renders on the server and the page is updated in place, without a reload.
Features
Small, strict and safe by default.
#[State]
State in PHP properties
Typed strings, numbers and booleans with Core validation rules, sealed or writable.
Read more →
#[Action]
Actions you allow
Only methods marked as actions can be called, each with its own permission.
Read more →
signed
Signed snapshots
HMAC with APP_KEY, tied to the CSRF token, renewed while the page stays open.
Read more →
query:
State in the address
Search and page live in the URL, so a refresh or a bookmark restores them.
Read more →
data-rx-model
Five binding modes
Live, debounce, lazy, blur or defer: send only as often as the form needs.
Read more →
data-rx-dialog
Dialogs and edit modals
Native dialogs with focus return, server-controlled opening and a safe cancel.
Read more →
CSP
Strict Content Security Policy
Runs with script-src and style-src self: no inline scripts, no unsafe-eval.
Read more →
dist/
No build step on hosting
Compiled, versioned assets ship with Composer. Works on cPanel.
Read more →
EN · AR · KU
Right to left and translated
Runtime messages in English, Arabic and Kurdish; override any line in your lang files.
Read more →
In your templates
A handful of attributes.
Bind inputs, call actions, show a loading state and open dialogs. Everything else stays plain HTML.
Template controls in the docsdata-rx-bind="search"- Update a writable property as the person types.
data-rx-model="lazy"- Choose when it is sent: debounce, lazy, blur or defer.
data-rx-action="clear"- Call a method marked #[Action].
data-rx-submit- Submit the current values with an action.
data-rx-loading- Shown while the request runs.
data-rx-dialog="edit"- A native dialog the server opens and closes.
data-rx-ignore="editor-5"- Leave a widget (rich text, a map) alone between updates.
Powers the admin panel, ready for your site.
flocms-admin's lists and dialogs run on Reactive. Use it on public pages too. Latest: 0.5.1, October 16, 2026.