Your First Page - Step 4
Build your first Thorm page and learn the basic workflow: structure, state, and rendering mode.
The Libraries: Hero
/Components/Hero.php file defines a Hero component class (App\Components\Hero) with a single static get() method that returns a Thorm Node. It composes a hero section by calling Section::get(...) with two column blocks:
- Left block: a pill label (“Rapid-response rabbit hole”), a headline (h1 ), a short descriptive paragraph (p), and three styled tags (“Boom!”, “Zap!”, “Contact!”).
- Right block: a centered mascot image (img) with alt text and a circular style.
Styling is applied via Thorm helpers like cls() and attrs(), producing Tailwind-like utility class strings. The overall section uses a card-like grid layout with spacing and responsive column sizing.
PHP
We need to mention here the Section class, a small helper to encapsulate the <section> tag and make the code a bit more readable.
PHP
Status: Developer Preview
Things may change, things might break. If something feels awkward, it's probably a design edge we're still smoothing out.
On this page