Skip to content

Commit 77f1700

Browse files
committed
more updates to replace official docs UX page
1 parent 5c88f86 commit 77f1700

File tree

1 file changed

+82
-18
lines changed

1 file changed

+82
-18
lines changed

src/StimulusBundle/doc/index.rst

Lines changed: 82 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
StimulusBundle: Symfony integration with Stimulus
22
=================================================
33

4+
.. tip::
5+
6+
Check out live demos of Symfony UX at https://ux.symfony.com!
7+
48
This bundle adds integration between Symfony, `Stimulus`_ and the Symfony UX packages:
59

610
A) Twig ``stimulus_`` functions & filters to add Stimulus controllers,
@@ -69,14 +73,39 @@ for all the goodies.
6973

7074
.. _ux-packages:
7175

72-
3rd Party Stimulus Controllers from UX Packages
73-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74-
75-
Your app will also activate any 3rd party controllers (installed by UX bundles)
76-
mentioned in your ``assets/controllers.json`` file.
76+
The UX Packages
77+
~~~~~~~~~~~~~~~
7778

78-
For a list of all of the UX package and other Stimulus tools, see the
79-
`Symfony UX documentation`_.
79+
Symfony provides a set of UX packages that add extra Stimulus controllers to solve
80+
common problems. StimulusBundle activates any 3rd party Stimulus controllers
81+
that are mentioned in your ``assets/controllers.json`` file. This file is updated
82+
whenever you install a UX package.
83+
84+
The official UX packages are:
85+
86+
* `ux-autocomplete`_: Transform ``EntityType``, ``ChoiceType`` or *any*
87+
``<select>`` element into an Ajax-powered autocomplete field
88+
(`see demo <https://ux.symfony.com/autocomplete>`_)
89+
* `ux-chartjs`_: Easy charts with `Chart.js`_ (`see demo <https://ux.symfony.com/chartjs>`_)
90+
* `ux-cropperjs`_: Form Type and tools for cropping images (`see demo <https://ux.symfony.com/cropperjs>`_)
91+
* `ux-dropzone`_: Form Type for stylized "drop zone" for file uploads
92+
(`see demo <https://ux.symfony.com/dropzone>`_)
93+
* `ux-lazy-image`_: Optimize Image Loading with BlurHash
94+
(`see demo <https://ux.symfony.com/lazy-image>`_)
95+
* `ux-live-component`_: Build Dynamic Interfaces with Zero JavaScript
96+
(`see demo <https://ux.symfony.com/live-component>`_)
97+
* `ux-notify`_: Send server-sent native notification with Mercure
98+
(`see demo <https://ux.symfony.com/notify>`_)
99+
* `ux-react`_: Render `React`_ component from Twig (`see demo <https://ux.symfony.com/react>`_)
100+
* `ux-svelte`_: Render `Svelte`_ component from Twig (`see demo <https://ux.symfony.com/svelte>`_)
101+
* `ux-swup`_: Integration with `Swup`_ (`see demo <https://ux.symfony.com/swup>`_)
102+
* `ux-translator`_: Use your Symfony translations in JavaScript `Swup`_ (`see demo <https://ux.symfony.com/translator>`_)
103+
* `ux-turbo`_: Integration with `Turbo Drive`_ for a single-page-app experience
104+
(`see demo <https://ux.symfony.com/turbo>`_)
105+
* `ux-twig-component`_: Build Twig Components Backed by a PHP Class
106+
(`see demo <https://ux.symfony.com/twig-component>`_)
107+
* `ux-typed`_: Integration with `Typed`_ (`see demo <https://ux.symfony.com/typed>`_)
108+
* `ux-vue`_: Render `Vue`_ component from Twig (`see demo <https://ux.symfony.com/vue>`_)
80109

81110
Lazy Stimulus Controllers
82111
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -110,6 +139,18 @@ To make a third-party controller lazy, in ``assets/controllers.json``, set
110139
If you write your controllers using TypeScript, make sure
111140
``removeComments`` is not set to ``true`` in your TypeScript config.
112141

142+
Stimulus Tools around the World
143+
-------------------------------
144+
145+
Because Stimulus is used by developers outside of Symfony, many tools
146+
exist beyond the UX packages:
147+
148+
* `stimulus-use`_: Add composable behaviors to your Stimulus controllers, like
149+
debouncing, detecting outside clicks and many other things.
150+
151+
* `stimulus-components`_ A large number of pre-made Stimulus controllers, like for
152+
Copying to clipboard, Sortable, Popover (similar to tooltips) and much more.
153+
113154
Stimulus Twig Helpers
114155
---------------------
115156

@@ -428,18 +469,41 @@ it will normalize it:
428469
<!-- will render as: -->
429470
<div data-controller="symfony--ux-chartjs--chart">
430471

431-
.. _Stimulus: https://stimulus.hotwired.dev/
432-
.. _Webpack Encore: https://symfony.com/doc/current/frontend.html
433-
.. _AssetMapper: https://symfony.com/doc/current/frontend/asset-mapper.html
434-
.. _Symfony UX documentation: https://symfony.com/doc/current/frontend/ux.html
435-
.. _Stimulus Controllers & Values: https://stimulus.hotwired.dev/reference/values
436-
.. _CSS Classes: https://stimulus.hotwired.dev/reference/css-classes
437-
.. _Stimulus Actions: https://stimulus.hotwired.dev/reference/actions
438-
.. _parameters: https://stimulus.hotwired.dev/reference/actions#action-parameters
439-
.. _Stimulus Targets: https://stimulus.hotwired.dev/reference/targets
440-
.. _StimulusBundle Flex recipe: https://github.com/symfony/recipes/tree/main/symfony/stimulus-bundle
441-
.. _experimental: https://symfony.com/doc/current/contributing/code/experimental.html
442472
.. _Encore vs AssetMapper: https://symfony.com/doc/current/frontend.html
443473
.. _Symfony Flex: https://symfony.com/doc/current/setup/flex.html
444474
.. _Stimulus Documentation: https://stimulus.hotwired.dev/
445475
.. _`@symfony/stimulus-bridge`: https://github.com/symfony/stimulus-bridge
476+
.. _`Stimulus`: https://stimulus.hotwired.dev/
477+
.. _`Webpack Encore`: https://symfony.com/doc/current/frontend.html
478+
.. _`AssetMapper`: https://symfony.com/doc/current/frontend/asset-mapper.html
479+
.. _`Stimulus Controllers & Values`: https://stimulus.hotwired.dev/reference/values
480+
.. _`CSS Classes`: https://stimulus.hotwired.dev/reference/css-classes
481+
.. _`Stimulus Actions`: https://stimulus.hotwired.dev/reference/actions
482+
.. _`parameters`: https://stimulus.hotwired.dev/reference/actions#action-parameters
483+
.. _`Stimulus Targets`: https://stimulus.hotwired.dev/reference/targets
484+
.. _`StimulusBundle Flex recipe`: https://github.com/symfony/recipes/tree/main/symfony/stimulus-bundle
485+
.. _`experimental`: https://symfony.com/doc/current/contributing/code/experimental.html
486+
.. _`ux-autocomplete`: https://symfony.com/bundles/ux-autocomplete/current/index.html
487+
.. _`ux-chartjs`: https://symfony.com/bundles/ux-chartjs/current/index.html
488+
.. _`ux-cropperjs`: https://symfony.com/bundles/ux-cropperjs/current/index.html
489+
.. _`ux-dropzone`: https://symfony.com/bundles/ux-dropzone/current/index.html
490+
.. _`ux-lazy-image`: https://symfony.com/bundles/ux-lazy-image/current/index.html
491+
.. _`ux-live-component`: https://symfony.com/bundles/ux-live-component/current/index.html
492+
.. _`ux-notify`: https://symfony.com/bundles/ux-notify/current/index.html
493+
.. _`ux-react`: https://symfony.com/bundles/ux-react/current/index.html
494+
.. _ux-translator: https://symfony.com/bundles/ux-translator/current/index.html
495+
.. _`ux-swup`: https://symfony.com/bundles/ux-swup/current/index.html
496+
.. _`ux-turbo`: https://symfony.com/bundles/ux-turbo/current/index.html
497+
.. _`ux-twig-component`: https://symfony.com/bundles/ux-twig-component/current/index.html
498+
.. _`ux-typed`: https://symfony.com/bundles/ux-typed/current/index.html
499+
.. _`ux-vue`: https://symfony.com/bundles/ux-vue/current/index.html
500+
.. _`ux-svelte`: https://symfony.com/bundles/ux-svelte/current/index.html
501+
.. _`Chart.js`: https://www.chartjs.org/
502+
.. _`Swup`: https://swup.js.org/
503+
.. _`React`: https://reactjs.org/
504+
.. _`Svelte`: https://svelte.dev/
505+
.. _`Turbo Drive`: https://turbo.hotwired.dev/
506+
.. _`Typed`: https://github.com/mattboldt/typed.js/
507+
.. _`Vue`: https://vuejs.org/
508+
.. _`stimulus-use`: https://stimulus-use.github.io/stimulus-use
509+
.. _`stimulus-components`: https://stimulus-components.netlify.app/

0 commit comments

Comments
 (0)