A pure css library to beautify checkbox and radio buttons.
npm install pretty-checkbox
npm or yarn package manager
sh
> npm install pretty-checkbox // or
> yarn add pretty-checkbox
`
Add pretty-checkbox.min.css in your html
- From CDN ( jsDelivr )
`html
`
- Manual download ( Github )
Download the source from Github.
`html
`
is where the library is downloaded.
SCSS
You can also import pretty-checkbox.scss in your main scss file.
`scss
@import '~pretty-checkbox/src/pretty.scss';
`
Please refer the document for SCSS settings.
$3
Pretty checkbox comes with many styles,
| Class name | Description |
| :---------- | :----------------------- |
| p-default | Basic style |
| p-switch | iOS like toggle style |
| p-icon | Custom font icons |
| p-svg | Custom SVG files, markup |
| p-image | Tiny images |
And three shapes p-round p-curve p-square (default)
#### Basic checkbox
`html
`
Basic checkbox has three variants p-fill p-thick p-outline (default)
You can combine them.
`html
`
---
#### Switch checkbox
Switch has three variants p-outline p-fill p-slim
`html
`
---
#### Custom Font icons
`html
`
Note: class
icon should be added along with icon class names
Note: For icons to work, you need to add appropriate font icons library. In above example , we used font awesome icon. So, FontAwesome should be included separately.
---
#### SVG
Supports SVG file in
tag, markup () and sprites
`html
`
Note: class
svg to be added in img tag or svg tag.
---
#### Image
Supports any type of valid image format.
`html
`
Note: class
image to be added in img tag.
---
#### Colors
There are five solid colors p-primary p-success p-warning p-info p-danger
And five outline colors p-primary-o p-success-o p-warning-o p-info-o p-danger-o
`html
`
Note: Color class must be added in state class. Solid colors and Ouline colors have distinct role in font icons and toggle feature.
$3
There are more features like Radio buttons , Toggle , States , Animations , Border less , Lock , Scale, SCSS Settings.
Please refer the documentation to know about them.
$3
Works in all modern browsers.
Chrome >= 26 Firefox >= 16 Safari >= 6.1 Opera >= 15 IE >= 9`