Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/p-cauty/css-toggle

A minimalist CSS-only toggle for your websites
https://github.com/p-cauty/css-toggle

Last synced: about 2 months ago
JSON representation

A minimalist CSS-only toggle for your websites

Awesome Lists containing this project

README

        

# css-toggle
A minimalist CSS-only toggle for your websites.

![image](https://user-images.githubusercontent.com/4071737/136765142-2d28886b-de0d-438e-b406-a4d74756c280.png)

![image](https://user-images.githubusercontent.com/4071737/136765564-886c13d4-294c-4934-afd1-544836a67cce.png)

## Installation

Just copy the `toggle.css` file into your project and add the following line of HTML into your `` tag:

```html

```

## Usage

Just add these two elements anywhere in your HTML:

```html

```

You can add an infinite number of toggles as long as they all have differents id/for attributes.

## Example

You can see a working example right here : https://p-cauty.github.io/css-toggle/

## Use the value in your backend

Just add a `name` attribute to your `input` tags and handle them as regular checkboxes in your backend.