@@ -165,20 +165,20 @@ HTML Syntax
165165~~~~~~~~~~~
166166
167167In addition to the ``ux_icon() `` function explained in the previous sections,
168- this package also supports an alternative HTML syntax based on the ``<twig:ux:icon > ``
168+ this package also supports an alternative HTML syntax based on the ``<twig:UX:Icon > ``
169169tag:
170170
171171.. code-block :: html
172172
173173 <!-- renders "user-profile.svg" -->
174- <twig:ux:icon name =" user-profile" class =" w-4 h-4" />
174+ <twig:UX:Icon name =" user-profile" class =" w-4 h-4" />
175175 <!-- renders "admin/user-profile.svg" -->
176- <twig:ux:icon name =" admin:user-profile" class =" w-4 h-4" />
176+ <twig:UX:Icon name =" admin:user-profile" class =" w-4 h-4" />
177177 <!-- renders 'user-solid.svg' icon from 'Flowbite' icon set via ux.symfony.com -->
178- <twig:ux:icon name =" flowbite:user-solid" />
178+ <twig:UX:Icon name =" flowbite:user-solid" />
179179
180180 <!-- you can also add any HTML attributes -->
181- <twig:ux:icon name =" user-profile" height =" 16" width =" 16" aria-hidden =" true" />
181+ <twig:UX:Icon name =" user-profile" height =" 16" width =" 16" aria-hidden =" true" />
182182
183183.. tip ::
184184
@@ -298,16 +298,16 @@ HTML Syntax
298298
299299.. code-block :: html+twig
300300
301- <twig:ux: icon name="user-profile" />
301+ <twig:UX: Icon name="user-profile" />
302302
303303 {# Renders "user-profile.svg" #}
304- <twig:ux: icon name="user-profile" class="w-4 h-4" />
304+ <twig:UX: Icon name="user-profile" class="w-4 h-4" />
305305
306306 {# Renders "sub-dir/user-profile.svg" (sub-directory) #}
307- <twig:ux: icon name="sub-dir:user-profile" class="w-4 h-4" />
307+ <twig:UX: Icon name="sub-dir:user-profile" class="w-4 h-4" />
308308
309309 {# Renders "flowbite:user-solid" from ux.symfony.com #}
310- <twig:ux: icon name="flowbite:user-solid" />
310+ <twig:UX: Icon name="flowbite:user-solid" />
311311
312312.. note ::
313313
@@ -363,9 +363,9 @@ Now, you can use the ``dots`` alias in your templates:
363363 {{ ux_icon('clarity:ellipsis-horizontal-line') }}
364364
365365 {# using the HTML syntax #}
366- <twig:ux: icon name="dots" />
366+ <twig:UX: Icon name="dots" />
367367 {# same as: #}
368- <twig:ux: icon name="clarity:ellipsis-horizontal-line" />
368+ <twig:UX: Icon name="clarity:ellipsis-horizontal-line" />
369369
370370Errors
371371------
@@ -419,7 +419,7 @@ three methods to improve icons accessibility, depending on the context.
419419 Back to profile
420420 </a >
421421
422- That is why the ``ux_icon() `` function and the ``<twig:ux:icon > `` component add
422+ That is why the ``ux_icon() `` function and the ``<twig:UX:Icon > `` component add
423423``aria-hidden="true" `` attribute **automatically ** to icons not having at least one
424424of the following attributes: ``aria-label ``, ``aria-labelledby `` or ``title ``.
425425
@@ -430,7 +430,7 @@ of the following attributes: ``aria-label``, ``aria-labelledby`` or ``title``.
430430
431431 .. code-block :: html+twig
432432
433- <twig:ux: icon name="user-profile" aria-hidden="false" />
433+ <twig:UX: Icon name="user-profile" aria-hidden="false" />
434434
435435Performance
436436-----------
@@ -461,7 +461,7 @@ In production, you can pre-warm the cache by running the following command:
461461 $ php bin/console ux:icons:warm-cache
462462
463463 This command looks in all your Twig templates for ``ux_icon() `` calls and
464- ``<twig:ux:icon > `` tags and caches the icons it finds.
464+ ``<twig:UX:Icon > `` tags and caches the icons it finds.
465465
466466.. caution ::
467467
@@ -493,18 +493,18 @@ TwigComponent
493493~~~~~~~~~~~~~
494494
495495The ``ux_icon() `` function is optimized to be as fast as possible. To deliver the
496- same level of performance when using the HTML syntax (``<twig:ux:icon name="..." /> ``),
496+ same level of performance when using the HTML syntax (``<twig:UX:Icon name="..." /> ``),
497497the TwigComponent overhead is reduced by calling the IconRenderer immediately and
498498returning the HTML output.
499499
500500.. warning ::
501501
502- The <twig:ux: icon > component does not support embedded content.
502+ The <twig:UX: Icon > component does not support embedded content.
503503
504504 .. code-block :: html+twig
505505
506506 {# The 🧸 will be ignored in the HTML output #}
507- <twig:ux: icon name="user-profile" class="w-4 h-4">🧸</twig:ux: icon >
507+ <twig:UX: Icon name="user-profile" class="w-4 h-4">🧸</twig:UX: Icon >
508508
509509 {# Renders "user-profile.svg" #}
510510 <svg viewBox="0 0 24 24" class="w-4 h-4">
0 commit comments