Default
Code
<twig:Toggle id="checked" value="" checked>
Toggle me
</twig:Toggle>
A static copy of the demo at release 0.3.0. Live Components, Turbo Streams and form submits need Symfony: run the full demo.
Use the toggle component to switch between a binary state of true or false using a single click available in multiple sizes, variants, and colors
php bin/console ux:install toggle \
--kit=https://github.com/xormania/uxor:0.3.0
templates/ → templates/ twig/html-extra:^3.24.0symfony/ux-twig-component:^3.5tales-from-a-dev/twig-tailwind-extra:^1.3.0<twig:Toggle id="checked" value="" checked>
Toggle me
</twig:Toggle>
<div class="flex flex-col gap-3">
<twig:Toggle id="checked" value="" disabled>
Toggle me
</twig:Toggle>
<twig:Toggle id="checked" value="" checked disabled>
Toggle me
</twig:Toggle>
</div>