If you want to use this component in a form, you’re in luck! There’s two props you can pass: isRequired and name.
The first one does what it says it does, while the latter sets the name attribute so you can access the toggle in, for example,
the FormData returned by a submission. Here’s an example showing how to set both of them: