curated by symfony

JavaScript tools you can't live without.

A set of PHP & JavaScript packages to solve every day frontend problems featuring Stimulus and Turbo.

Install it

$ composer require symfony/asset-mapper symfony/stimulus-bundle
  • assets
    • bootstrap.js
    • app.js
    • controllers.json
    • controllers
      • hello_controller.js
    • styles
      • app.css
  • package.json
  • webpack.config.js

Stimulus Controllers

Write custom JavaScript inside Stimulus Controllers

Read full Documentation
<div data-controller="markdown">
    <textarea
        data-markdown-target="input"
        data-action="markdown#render"
    >Writing _JavaScript_ is... a **dream** with Stimulus 🤩</textarea>
    <div data-markdown-target="preview">
        <small>&lt;- Write something in the textarea!</small>
    </div>
</div>
import { Controller } from '@hotwired/stimulus';
import snarkdown from 'snarkdown';

/* stimulusFetch: 'lazy' */
export default class extends Controller {
    static targets = ['input', 'preview'];

    render(event) {
        const rendered = snarkdown(this.inputTarget.value);
        this.previewTarget.innerHTML = rendered;
    }
}
And you have a Markdown live converter!
<- Write something in the textarea!

Packages

Install UX Components

Browse all Packages
Image for the Icons UX package

Icons

Render SVG icons seamlessly from your Twig templates.

Image for the Map UX package

Map

Render interactive Maps in PHP with Leaflet or Google Maps.

Image for the Twig Components UX package

Twig Components

Create PHP classes that can render themselves

Image for the Live Components UX package

Live Components

Build dynamic interfaces with zero JavaScript

Image for the Turbo UX package

Turbo

Integration with Turbo for single-page-app and real-time experience

Image for the Stimulus UX package

Stimulus

Integration with Stimulus for HTML-powered controllers

Image for the Toolkit UX package

Toolkit

Collection of components and templates that you can use to build your pages.

Image for the Native UX package

Native

Build native mobile apps that wrap your Symfony web application

Image for the Autocomplete UX package

Autocomplete

Ajax-powered, auto-completable select elements

Image for the Translator UX package

Translator

Use Symfony's translations in JavaScript

Image for the Chart.js UX package

Chart.js

Easy charts with Chart.js

Image for the React UX package

React

Quickly render <React /> components & pass them props.