How do you control a list of checkboxes or radio boxes with binding? Do you declare a list of booleans and use bind:checked on each of the checkboxes and radio boxes?
Well, you can use bind:group to control a group of checkboxes or radio boxes with 1 variable!
---
💻 REPL https://svelte.dev/repl/09e2bcf96f7d4...
🎧 Svelte Tutorial for Beginners • Svelte Tutorial for Beginners
📚 Related Resources
Svelte https://svelte.dev
Svelte REPL https://svelte.dev/repl
Svelte Tutorial: Group inputs https://svelte.dev/tutorial/group-inputs
🥰 Support me https://www.buymeacoffee.com/lihautan
🔗 Want to learn more from me? Check out these links:
Twitter: / lihautan
Blog: https://lihautan.com/
Newsletter: https://lihautan.com/newsletter
#svelte #sveltetutorial #sveltebeginner
Thanks for watching 🥰 -- with love, Li Hau