1.0.2 • Published 9 months ago
noicss.toggle v1.0.2
Installation:
npm install noicss.toggle
Usage:
import it into your CSS file:
@layer toggle, main;
@import url("noicss.toggle") layer(toggle);
/* YOUR OWN CSS: */
@layer main {
:root {
/* CUSTOMIZATION (the following values are the defaults): */
--noicssToggleWidth: 4rem;
--noicssToggleHeight: 2rem;
--noicssToggleRed: oklch(58% 0.22 27);
--noicssToggleGreen: oklch(70% 0.2 135);
--noicssToggleBorder: oklch(95% 0 0);
--noicssToggleButton: oklch(95% 0 0);
--noicssToggleButtonBorder: oklch(80% 0 0);
--noicssToggleOutline: currentcolor;
}
}
and use it in your html like this:
<label class="noicssToggle">
<input type="checkbox" />
</label>