@@ -4,25 +4,76 @@ Symfony UX Toolkit
44**EXPERIMENTAL ** This component is currently experimental and is likely
55to change, or even change drastically.
66
7- Symfony UX Toolkit provides a set of ready-to-use UI components for Symfony applications.
7+ Symfony UX Toolkit provides a set of ready-to-use Tailwind CSS based UI components for Symfony applications.
88It is part of `the Symfony UX initiative `_.
99
10+ Please note that the **UX Toolkit is not a library of UI components **,
11+ but **a tool to help you build your own UI components **.
12+ It uses the same approach than the popular `Shadcn UI `_,
13+ and a similar approach than `Tailwind Plus `_.
14+
15+ After installing the UX Toolkit, you can start pulling the components you need
16+ from the `UX Components page `_, and use them in your project.
17+ They become your own components, and you can customize them as you want.
18+
19+ These UI components are based on `Twig Component `_ UX package, so we are sure
20+ to provide the best experience as possible to Symfony developers.
21+
22+ Additionally, the UI components come with `html_cva ` and `tailwind_merge `,
23+ you can either remove them from your project or install `twig/html-extra `
24+ and `tales-from-a-dev/twig-tailwind-extra ` to use them.
25+
26+ Also, we do not force you to use Tailwind CSS at all. If you want to use
27+ another CSS framework, you can, but you will need to adapt the UI components to it.
28+
1029Installation
1130------------
1231
13- TODO
32+ Install the UX Toolkit using Composer and Symfony Flex:
33+
34+ .. code-block :: terminal
35+
36+ # The UX Toolkit is a development dependency:
37+ $ composer require symfony/ux-toolkit --dev
38+
39+ # If you want to to keep `html_cva` and `tailwind_merge` in your UI components:
40+ $ composer require twig/html-extra tales-from-a-dev/twig-tailwind-extra
1441
1542 Configuration
1643-------------
1744
1845TODO
1946
47+ Usage
48+ -----
49+
50+ You may find a list of components in the `UX Components page `_, with the installation instructions for each of them.
51+
52+ For example, if you want to install the `Button ` component, you will find the following instruction:
53+
54+ .. code-block :: terminal
55+
56+ $ bin/console ux:toolkit:install Button
57+
58+ It will create the ``templates/components/Button.html.twig `` file, and you will be able to use the `Button ` component like this:
59+
60+ .. code-block :: html+twig
61+
62+ <twig:Button>Click me</twig:Button>
63+
2064Backward Compatibility promise
2165------------------------------
2266
2367This bundle aims at following the same Backward Compatibility promise as
2468the Symfony framework:
2569https://symfony.com/doc/current/contributing/code/bc.html
2670
71+ However, the UI components and other files provided by the Toolkit **are not ** covered by the Backward Compatibility
72+ promise.
73+ We may break them in patch or minor release, but you won't get impacted unless you re-install the same UI component.
74+
2775.. _`the Symfony UX initiative` : https://ux.symfony.com/
28- #.. _`Twig Component `: https://symfony.com/bundles/ux-twig-component/current/index.html
76+ .. _`Twig Component` : https://symfony.com/bundles/ux-twig-component/current/index.html
77+ .. _`UX Components page` : https://ux.symfony.com/components
78+ .. _`Shadcn UI` : https://ui.shadcn.com/
79+ .. _`Tailwind Plus` : https://tailwindcss.com/plus
0 commit comments