Switch

Last Update : 14 August, 2023 | Published : 01 July, 2023 | 1 Min Read

Switch - used to adjust settings on/off. Switch can also be used as controls, as well as the state it’s in. Usually seen in:

  • Login page (Remember me)

Import

import Switch from '@intelops/intelops_ui/packages/react/components/Switch/src';

Create a Switch

  <SwitchButton
    className="switch"
    disabled ="false"
  >
  Name of the switch 
  </SwitchButton>

Props

NameTypeDescription
idstringUnique to each element can be used to lookup an element getElementById( )
classNamestringTo add new or to override the applied styles
childrennodeComponents content
disabledbooleanIf you want th switch to be diabled add true, else add false
onChangefunctionTo handle click changes - applied to the DOM element

Looking for Cloud-Native Implementation?

Finding the right talent is pain. More so, keeping up with concepts, culture, technology and tools. We all have been there. Our AI-based automated solutions helps eliminate these issues, making your teams lives easy.

Contact Us