Go Pro Sign Up Login
0 days 0 hrs 0 min 0 sec

Summer Sale

50% off Level Up Pro until you unsubscribe.
Get access to ALL 128 courses on Level Up Tutorials

This is your last chance to get Level Up Pro for $145/year.

or Learn More
Moon Moon

Buy Now and unlock this series




yours forever

Become a Pro and unlock everything




per month

Creating a Toggle

The first component we will create for our series is a toggle switch. We will start simple and set it up with some basic styling.


Become a pro to download code and videos



10 months ago [edited]

@Scott, what extension are you using for the autocomplete/predictive text. Also which terminal are you using?

User avatar


12 months ago [edited]

In the real world using a checkbox for a toggle probably isn't ideal. But if you did, you definitely wouldn't want to make the initial check box input display: none. That would erase the keyboard accessibility by removing the input from the DOM.

Heydon Pickering has done some good writing on this topic: https://inclusive-components.design/toggle-button/

Want to join the conversation?

Become a Pro member today!