Skip to content

melvingrootenboers/BooleanSlider

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boolean Slider

This is an implementation of a boolean slider using just HTML and CSS.

Contributing

For more information on contributing to this repository visit Contributing to a GitHub repository!

Typical usage scenario

Use this in both mobile and web for an upgrade to a checkbox.

Usage

Common usage involves changing the colors used. The CSS classes that are most commonly involved are the following:

/* background used in true state */
.wgt-BooleanSlider__input:checked + .wgt-BooleanSlider__toggle {
    background-color: #5198db;
}

/* background used in false state */
.wgt-BooleanSlider__toggle {
    background-color: #ddd;
}

/* color of the circle */
.wgt-BooleanSlider__toggle:before {
    background-color: #fff;
}

About

A Mendix Boolean Slider using only CSS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 66.2%
  • CSS 31.5%
  • HTML 2.3%