Technical Mid Level

How does Symfony UX and Stimulus work? Explain how Stimulus controllers connect HTML to JavaScript behaviour, and how the Symfony UX packages extend this.

Quick Tip

Stimulus keeps JavaScript minimal — each controller handles one behaviour. I add data-controller to HTML and the JavaScript activates automatically. With Turbo, most pages feel like an SPA without writing frontend framework code.

What good answers include

Symfony UX is a set of PHP packages that integrate JavaScript libraries via Stimulus controllers. Stimulus is a lightweight JS framework that connects HTML elements to controller classes using data attributes (data-controller, data-action, data-target). Symfony UX packages (Turbo, Chartjs, Autocomplete, Live Component, etc.) provide pre-built Stimulus controllers installable via Composer. AssetMapper or Encore loads the controllers. The key concept: server-rendered HTML drives the behaviour — no client-side routing or virtual DOM. Strong candidates explain: the naming convention between controller filenames and data-controller values, Stimulus values and targets for managing state, how Turbo frames enable partial page updates without writing JavaScript, and when UX Live Components replace the need for a JavaScript framework.

What interviewers are looking for

Tests frontend strategy in Symfony. Candidates who default to React or Vue for every interactive feature may not know that Symfony UX handles common patterns with less complexity. Those who understand Stimulus and Turbo can build interactive applications with minimal JavaScript.

← All Symfony questions