Thorm
Get started
Get Started in 5 minutes
First Page
Your first page
The controller
Header
Hero section
Contact section
The API
Considerations
Docs
Overview
Guides
Intro
Atoms
Node builders
Props helpers
State + expressions
Expression builder
Events + actions
Effects + targets
API
Api
Examples
Roadmap
Blog
Community
Get Started
GitHub
Attrs
Reactive HTML attributes and inline styles bound to state.
Reactive attribute demo
Hover me, then click
Count:
PHP
📄 Copy code
<?php $cnt = state(0); $app = el('div', [ cls('container') ], [ el('h2', [], [ text('Reactive attribute demo') ]), el('button', [ attrs(['title' => concat('Clicked ', read($cnt), ' times')]), cls('btn btn-primary'), style(['padding'=>'8px 12px','margin'=>'6px','border'=>'1px solid #ccc']), on('click', inc($cnt, 1)) ], [ text('Hover me, then click') ] ), el('div', [], [ text(concat('Count: ', read($cnt))) ]), ]);