tailwindcss-custom-forms
tailwindcss-custom-forms copied to clipboard
Is there a way to select multiple buttons in a single form?
I know that I can select multiple checkboxes in a form but how do I select multiple buttons that change their state (color) after the click in a single form? Is there a JavaScript component I need to look into along with the custom-forms package? I've included the block of code I'm using to build these buttons. Thanks in advance!
`
<div class = "p-5">
<button class="hover:bg-green-200 border border-gray-700 py-2 px-4 rounded w-40">
<div class = "text-left text-black font-bold">
Option1
</div>
</button>
</div>
<div class = "p-5">
<button class="hover:bg-green-200 border border-gray-700 py-2 px-4 rounded w-40">
<div class = "text-left text-black font-bold">
Option2
</div>
</button>
</div>
<div class = "p-5">
<button class="hover:bg-green-200 border border-gray-700 py-2 px-4 rounded w-40">
<div class = "text-left text-black font-bold">
Option3
</div>
</button>
</div>
<div class = "p-5">
<button class="hover:bg-green-200 border border-gray-700 py-2 px-4 rounded w-40">
<div class = "text-left text-black font-bold">
Option4
</div>
</button>
</div>
<div class = "p-5">
<button class="hover:bg-green-200 border border-gray-700 py-2 px-4 rounded w-40">
<div class = "text-left text-black font-bold">
Option5
</div>
</button>
</div>