A page is the route's visible result
HomePage extends Page and body() returns the visible tree. The route selects the page; body does not need to read global files.
final class GreetingCard extends Component
{
public function __construct(private string $name) {}
public function body(): View
{
return Section(Heading('Hello ' . $this->name));
}
}Components reduce repetition
A component is a PHP class returning View. Pass typed constructor values and keep local presentation together. Reuse it from pages without copying markup.
Native semantics remain visible
Heading, MainContent, Aside, Form, Label, and Button retain their HTML meaning. Accessibility starts from choosing the right component.