# How to create a toggle button

**URL:** <https://forum.bubble.io/t/how-to-create-a-toggle-button/216505>\
**Category:** Tips\
**Created:** [July 21, 2022, 10:28pm UTC](https://forum.bubble.io/t/how-to-create-a-toggle-button/216505 "2022-07-21T22:28:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![burgoscervantes](https://avatars.discourse-cdn.com/v4/letter/b/c37758/32.png) [@burgoscervantes](https://forum.bubble.io/u/burgoscervantes)\
**Post date:** [July 21, 2022, 10:28pm UTC](https://forum.bubble.io/t/how-to-create-a-toggle-button/216505/1 "2022-07-21T22:28:40Z")

</div>

Hi

I want to share how to create a toggle button because I was searching on internet and in this forum but there is not a good answer about it.

You can create with simple CSS.

**Step 1**

Install the plugin Classify

> [@fire Classify 4: A tiny plugin that brings CSS classes and +](http://forum.bubble.io/t/classify-a-tiny-plugin-that-brings-css-power-to-bubble/67741):
>
> sob THE ISSUE: To be the coolest no-code platform on the block, Bubble had to make it dead simple for non-devs to create web apps. This means that the folks who made Bubble had to cut down on what’s possible to achieve in web development in favor of a slick and well framed platform for «visual coding». Thanks to them, now my grandma’s makin more Gs than her doc. moneybagstar_struck THE KLUDGE: Classify is a plugin that aims to gap that lost potential by easing the use of custom codes wit…

**Step 2**  
Add a checkbox without text

**Step 3**  
Add a class to the checkbox element: {addClass: “cm-toggle”}

**Step 4**  
Using the CSS of this page:

> **[Convert Checkbox to Toggle Button using CSS | Codeconvey](https://codeconvey.com/convert-checkbox-to-toggle-button-css/)**
>
> Here is a complete soution to convert HTML checkbox to toggle button using pure CSS. You can style both input type checkbox & radio to toggle button.

And with some little modifications you can have the same results

**Step 5**  
Add an HTML element and Copy and paste this CSS code:

> <https://gist.github.com/SaulBurgos/435d444512d1b6a5d977f125b5b6fcb1>
