0.1.2 • Published 2 years ago

@simple-elements/switch v0.1.2

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

@simple-elements/switch

This is library for simple but customizible switch. To use it just install it use npm: npm install @simple-elements/switch or use yarn: yarn add @simple-elements/switch or use this tag in header: <script type="module" src="https://unpkg.com/@simple-elements/switch@0.1.0/dist/switch.es.js"></script> And then in your html insert: <olshamb-switch-html>Label</olshamb-switch-html> Tip: If you are using npm module import library into js. import '@simple-elements/switch'; To customize it select element in css and setup these properities:

.your-switch {
    --switch-width: 60px;
    --switch-height: 20px;
    --switch-thumb-width: 20px;
    --switch-thumb-height: 20px;
    --switch-thumb-margin: 5px;
    --switch-background-color: rgb(209 213 219);
    //--switch-border-style: #ccc;
    --switch-border-radius: 4px;
    //--switch-shadow-style: #ccc;
    --switch-thumb-background-color: #fff;
    //--switch-thumb-border-style: #ccc;
    --switch-thumb-border-radius: var(--switch-border-radius);
    //--switch-thumb-shadow-style: #ccc;
    --switch-active-color: #3e7deb;
}
0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago