LATEST >>

Welcome Here And Thanks For Visiting. Like Us On Facebook...

EXEIdeas – Let's Your Mind Rock » CSS Codes / HTML-CSS-PHP-JavaScript » Simple Toggle Flip Switch (Checkbox Button) With Animated Transitions Using CSS3

Simple Toggle Flip Switch (Checkbox Button) With Animated Transitions Using CSS3

Simple-Toggle-Flip-Switch-(Checkbox-Button)-With-Animated-Transitions-Using-CSS3
Toggles showed a new trend in UI designing. For several years designers are using the checkboxes for binary input options with simple tick-based UI that is by default. When a user has to select an option, they have to tick a box or when want to un-select the option then have to uncheck the box. Practically checkboxes did the job perfectly, but still, it lacks the new attractive UI concepts. Even though designers have made the checkboxes modern and used eye-catching animation effects by applying CSS on it but still it feels like a little old school design. Here we have an interactive simple CSS toggle to give a natural and meaningful interaction to the user.

There are many code snippets available online or on many other blogs and website but everyone is not able to optimize your blog or website so you need some optimized code snippet. So now checkout out code snippet for your blog and website that will give you all features for your desired code. Now grab the ready to use code and paste it where you want.

Table of Contents

Simple Toggle Flip Switch Checkbox Button Snippet:

CSS:

<style type="text/css">
input[type=checkbox]{height: 0;width: 0;visibility: hidden;}
label {cursor: pointer;text-indent: -9999px;width: 200px;height: 100px;background: grey;display: block;border-radius: 100px;position: relative;}
label:after {content: '';position: absolute;top: 5px;left: 5px;width: 90px;height: 90px;background: #fff;border-radius: 90px;transition: 0.3s;}
input:checked + label {background: #bada55;}
input:checked + label:after {left: calc(100% - 5px);transform: translateX(-100%);}
label:active:after {width: 130px;}
</style>

HTML

<input type="checkbox" id="switch" /><label for="switch">Toggle</label>

Alternate: Remove Or Strip Specific HTML Tags In Content Using Regex:

Check out On/Off FlipSwitch button online generater using pure CSS3 On/Off flipswitches with animated transitions and a lot of customization at https://proto.io/freebies/onoff/

Customization:

You can edit your HTML CSS if you want with colors etc. Nothing to customize anything more.

Troubleshooting the Errors

Do it with concentration and patience. Check your alls steps and again and all codes or scripts. If you find any error you can contact us anytime via comment or better via email, We are always here to help you.

Final Words:

That’s all we have. We hope that you liked this article. If you have any problem with this code in your template then feel free to contact us with a full explanation of your problem. We will reply to you as time allows us or If you have any doubts and problem please comment below. We are happy to help you! If you liked this article, Don’t forget to share this with your friends so they can also take benefit from it and leave your precious feedback in our comment form below. Happy development, See you in the next article.

Recommended For You:
Copy Text From One TextArea To Another TextArea Using JavaScript

You Like It, Please Share This Recipe With Your Friends Using...

Be the first to write a comment.

Leave a Reply

Your email address will not be published. Required fields are marked *