All Projects → victornpb → vt-toggle

victornpb / vt-toggle

Licence: Apache-2.0 license
Turn HTML checkbox inputs into fancy toggle switches with just a CSS class

Programming Languages

HTML
75241 projects
CSS
56736 projects
SCSS
7915 projects

Projects that are alternatives of or similar to vt-toggle

Nativescript Checkbox
NativeScript plugin for checkbox UI component
Stars: ✭ 113 (+707.14%)
Mutual labels:  checkbox
Flutter smart select
SmartSelect allows you to easily convert your usual form select or dropdown into dynamic page, popup dialog, or sliding bottom sheet with various choices input such as radio, checkbox, switch, chips, or even custom input. Supports single and multiple choice.
Stars: ✭ 179 (+1178.57%)
Mutual labels:  checkbox
Simplecheckbox
A simple Checkbox
Stars: ✭ 253 (+1707.14%)
Mutual labels:  checkbox
Bootstrap Table
An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation, Vue.js)
Stars: ✭ 11,068 (+78957.14%)
Mutual labels:  checkbox
React Icheck
🔘 iCheck components built with React. Highly customizable checkbox, radio buttons and radio group.
Stars: ✭ 175 (+1150%)
Mutual labels:  checkbox
Bemcheckbox
Tasteful Checkbox for iOS. (Check box)
Stars: ✭ 2,578 (+18314.29%)
Mutual labels:  checkbox
React Checkbox Group
Sensible checkbox groups manipulation for DOM.
Stars: ✭ 109 (+678.57%)
Mutual labels:  checkbox
smart-webcomponents-community
Material & Bootstrap Web Components built with Smart
Stars: ✭ 30 (+114.29%)
Mutual labels:  checkbox
Awesome Bootstrap Checkbox
✔️Font Awesome Bootstrap Checkboxes & Radios. Pure css way to make inputs look prettier
Stars: ✭ 2,044 (+14500%)
Mutual labels:  checkbox
Teaset
A UI library for react native, provides 20+ pure JS(ES6) components, focusing on content display and action control.
Stars: ✭ 2,845 (+20221.43%)
Mutual labels:  checkbox
Snapchatcheckbox
A Snapchat-inspired checkbox.
Stars: ✭ 147 (+950%)
Mutual labels:  checkbox
Angular Bootstrap Checkbox
A checkbox for AngularJS styled to fit the Twitter Bootstrap standard design
Stars: ✭ 154 (+1000%)
Mutual labels:  checkbox
React Menu
React component for building accessible menu, dropdown, submenu, context menu and more.
Stars: ✭ 237 (+1592.86%)
Mutual labels:  checkbox
Pretty Checkbox
A pure CSS library to beautify checkbox and radio buttons.
Stars: ✭ 1,708 (+12100%)
Mutual labels:  checkbox
Examples wxWidgets
Shows how to use wxWidgets controls only by programming code (c++17).
Stars: ✭ 116 (+728.57%)
Mutual labels:  checkbox
Ember Toggle
Checkbox based Toggle Switches for Ember
Stars: ✭ 111 (+692.86%)
Mutual labels:  checkbox
React Native Checkbox
Checkbox component for React Native
Stars: ✭ 193 (+1278.57%)
Mutual labels:  checkbox
LC-switch
Superlight vanilla javascript plugin improving forms look and functionality
Stars: ✭ 31 (+121.43%)
Mutual labels:  checkbox
react-inputs-validation
A react component for form inputs validation. Online demo examples
Stars: ✭ 48 (+242.86%)
Mutual labels:  checkbox
Pretty Checkbox Vue
Quickly integrate pretty checkbox components with Vue.js
Stars: ✭ 240 (+1614.29%)
Mutual labels:  checkbox

vt-toggle

Turn HTML checkbox inputs into fancy toggle switches with just a CSS class

Demo: https://victornpb.github.io/vt-toggle/

What is this?

You can turn a simple checkbox like this

Into this fancy toggle just by addind the vt-toggle class

<input type="checkbox" class="vt-toggle">

Install

Ok, cool! how can I get it?

NPM

npm install vt-toggle

Bower

bower install vt-toggle

CDN

https://unpkg.com/browse/[email protected]/css/vt-toggle.css

Download

https://github.com/victornpb/vt-toggle/releases/

Importing into project

Import using link

<link rel="stylesheet" type="text/css" href="bower_components/vt-toggle/css/vt-toggle.css">
<link rel="stylesheet" type="text/css" href="node_modules/vt-toggle/css/vt-toggle.css">
Import using SASS
@import "node_modules/vt-toggle/scss/vt-toggle"; // NPM
@import "bower_components/vt-toggle/scss/vt-toggle"; // Bower

Creating your own classes using SASS

You can create your own classes using the SASS mixin.

@mixin vt-toggle($toggleWidth, $toggleHeight, $handleMargin, $roundness, $on-color, $off-color, $label)

Example:

@import "bower_components/vt-toggle/scss/vt-toggle";

$blue: #00f;
$red: #f00;

input.vt-toggle.accent {
    @include vt-toggle(44px, 22px, 1px, 1, $blue, gray, false);
}
input.vt-toggle.danger {
    @include vt-toggle(44px, 22px, 1px, 1, $red, gray, false);
}

Then you can use:

<input type="checkbox" class="vt-toggle accent"> I'm blue toggle
<input type="checkbox" class="vt-toggle danger"> I'm red toggle

Default styles

Default Sizes:

class Dimensions Preview
xs 18x22
sm 32x16
md 44x22 (default)
lg 64x32

States

State Preview
On
Off
Disabled (on)
Disabled (off)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].