<Toggle> Component

A simple toggle, used primarily in consent manager.

Share
Code Editor

Where it's used

0.x.x
Loading 0.x.x releases...
1.x.x
Loading 1.x.x releases...
2.x.x
Loading 2.x.x releases...
3.x.x
Loading 3.x.x releases...
4.x.x
Loading 4.x.x releases...

Props

NameDescription
enabled
boolean
Whether the toggle is on or off
onChange
function
Function that will be called when the toggle is changed to on or off

Examples

You can pass the enabled prop in to toggle.

Share
Code Editor

You can also pass the onChange function to react when the toggle changes state

Share
Code Editor