-1

I have to make something similar to this control :

enter image description here

What is it? does it have any events?

Jaskaran Singh
  • 2,392
  • 24
  • 39
pheromix
  • 18,213
  • 29
  • 88
  • 158
  • It's a switch. They are usually implemented using an input element of `type="checkbox"` but can be any html/JSX component with toggleable state. Event would be the `onChange` event. Many component libraries have prebuilt switch/toggles that you can customize. Material-UI, AntD, etc... Google is your friend. – Drew Reese Feb 19 '21 at 05:35
  • Looks like [toggle switch](https://www.sitepoint.com/react-toggle-switch-reusable-component/) – Hassan Imam Feb 19 '21 at 05:35
  • There's [one answer](https://stackoverflow.com/a/52713990/996081) here which implements a similar control. Many component libraries such as Bootstrap also implement a similar switch control, e.g. https://getbootstrap.com/docs/4.2/components/forms/#switches – cbr Feb 19 '21 at 05:38