import { Toggle } from "@wfp/react"; () => { return ( <Toggle labelA="Off" labelB="On" name="togglename" /> ); };
boolean
Specify whether the toggle should be on by default
string
Specify the label for the "off" position
Specify the label for the "on" position
(value: boolean,htmlFor: string,event: ChangeEvent<HTMLInputElement>) => void
Provide an optional hook that is called when the control is toggled
Provide an id that unique represents the underlying input
input
Provide an name that unique represents the underlying input
(event: ChangeEvent<HTMLInputElement>) => void
Provide a function that is called when a change event occurs on the control
any