Quick Start

Before getting started, we need to build an install the Ardillo extension in the development/target environment. The, for each new Ardillo project, we need to install the Ardilo Loop package:

composer require ardillo/loop

Hello World example

At this point, we can start developing our Ardillo application. The following example shows a simple Ardillo application that displays a window with a label:

Hello World


use Ardillo\{ReactApp, Label, Size, Window};

require_once __DIR__ . '/vendor/autoload.php';

// Please use PSR-4 class autoloading in your own projects, this is just an example
class MyWindow extends Window
    protected Label $label;

    public function onClosing(): int

        return 1;

    public function setup(): void
        $this->label = new Label('Hello World!');

class MyApp extends ReactApp
    public Window $window;

    protected function OnInit(): void
        $this->window = new MyWindow('My App', new Size(400, 300), false);

$app = new MyApp();

Please note how the application class holds a reference to its window and the latter does the same for its label. This is necessary to keep the objects alive during the application lifecycle. Please refer to the App Lifecycle section for more details.