Skip to content

Form Toggle

FormToggle is simply a check box styled to look like a rounded toggle button! The style fits in perfectly with the rest of the theme of Galaxy.

index.mdx
import { FormToggle } from '@futurethemes/galaxy:components'
<FormToggle
id="my-toggle"
name="my-toggle"
>
<Fragment slot="before">
Active?
</Fragment>
</FormToggle>

Slots

before

The before slot allows you to enter text or icons to display to the left or instrinsic start of the button itself.

Useful for labels!

index.mdx
import { FormToggle } from '@futurethemes/galaxy:components'
<FormToggle
id="my-toggle"
name="my-toggle"
>
<Fragment slot="before">
Active?
</Fragment>
</FormToggle>

Props

id

string

The id of the actual checkbox element. Set this so you can pick it up in your form.

name

string

The name of the actual checkbox element. Set this so you can pick it up in your form.