VOOZH about

URL: https://www.geeksforgeeks.org/css/materialize-css-switches/

⇱ Materialize CSS Switches - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Materialize CSS Switches

Last Updated : 11 Sep, 2020

Materialize provides switches to allow the viewer to select an option between the two available. Generally, switches are special checkboxes used for binary states such as on/off or yes/no or agree/disagree.

Switches can be created by using the “switch” class inside the wrapper div with the input type = “checkbox”. The other required class is “lever” that is used in the <span> tag. Switches can be modified according to ones choice by adding CSS elements. Here is the basic view of switch.

Example:

Output:

👁 Image
Comment