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
Repeat
Render reactive lists with keyed repeat templates.
Repeat aka List
First item
Second item
Third item
Fourth item
PHP
📄 Copy code
<?php $items = state([ ['id' => 1, 'name' => 'First item'], ['id' => 2, 'name' => 'Second item'], ['id' => 3, 'name' => 'Third item'], ['id' => 4, 'name' => 'Fourth item'], ]); $item = el('li', [ cls('nav-link') ], [ text(item('name')) ]); $app = el('div', [ cls('container my-5') ], [ el('h1', [], [ text('Repeat aka List')]), el('ul', [ cls('nav') ], [ repeat( read($items), item('id'), $item ), ]), ]);