Controllers are the fundamental building blocks of Stimulus applications. They connect behavior to your HTML.
- A controller is a JavaScript object that encapsulates the behavior for a DOM element and its descendants.
- Controllers are defined as ES classes, extending from
Stimulus.Controller
.