11# Pretty checkbox
22
3- No more boring old fashioned checkboxes. New scalable CSS3 pretty checkbox and radio buttons with custom font icon library. ** Only CSS** !
3+ No more boring old fashioned checkboxes. New scalable CSS3 pretty checkbox and radio buttons with custom font icon library. ** Only CSS** !
44
55Check it out the [ Demo] ( https://lokesh-coder.github.io/pretty-checkbox/ ) for complete documentation.
66
77### Get started
88
9- Install the library from ` bower ` or ` npm ` package manager
9+ Install the library from ` bower ` , ` npm ` or ` yarn ` package manager
1010
1111``` sh
1212> bower install pretty-checkbox
1313```
1414``` sh
1515> npm install pretty-checkbox
1616```
17+ ``` sh
18+ > yarn add pretty-checkbox
19+ ```
1720Add ` pretty.min.css ` in your html
1821
19- From CDN,
22+ From CDN,
2023``` html
21- <link rel =" stylesheet" href =" https://cdnjs.cloudflare.com/ajax/libs/pretty-checkbox/2.0.2 /pretty.min.css" />
24+ <link rel =" stylesheet" href =" https://cdnjs.cloudflare.com/ajax/libs/pretty-checkbox/2.1.0 /pretty.min.css" />
2225```
2326or from the source,
2427``` html
@@ -34,127 +37,36 @@ You can also import `pretty.scss` in your main scss file.
3437Checkbox markup,
3538``` html
3639<div class =" pretty" >
37- <input type =" checkbox" />
40+ <input type =" checkbox" />
3841 <label ><i class =" mdi mdi-check" ></i > Buy vegetables</label >
3942</div >
4043```
4144
42- ### checkbox Features
45+ ### Basic examples
4346
44- ##### Inline checkbox
45- ``` html
46- <div class =" pretty inline" >
47- <input type =" checkbox" />
48- <label ><i class =" mdi mdi-close" ></i > Buy vegetable</label >
49- </div >
50- ```
51- ##### Rounded Checkbox
52- ``` html
53- <div class =" pretty inline circle" >
54- <input type =" checkbox" />
55- <label ><i class =" mdi mdi-check" ></i > Monday</label >
56- </div >
57- ```
47+ ##### Checkbox
5848
59- ##### Solid Checkbox color
6049``` html
61- <div class =" pretty inline primary" >
62- <input type =" checkbox" />
50+ <div class =" pretty primary" >
51+ <input type =" checkbox" />
6352 <label ><i class =" mdi mdi-check" ></i > Primary</label >
6453</div >
6554```
66- Color variants: ` primary ` , ` success ` , ` warning ` , ` info ` , ` danger `
67- ##### Outline Checkbox color
68- ``` html
69- <div class =" pretty inline outline-primary" >
70- <input type =" checkbox" />
71- <label ><i class =" mdi mdi-check" ></i > Outline primary</label >
72- </div >
73- ```
74- Color variants: ` outline-primary ` , ` outline-success ` , ` outline-warning ` , ` outline-info ` , ` outline-danger `
75- ##### Without border - plain checkbox
76- ``` html
77- <div class =" pretty inline outline-success plain" >
78- <input type =" checkbox" />
79- <label ><i class =" mdi mdi-check" ></i > Oh, yes!</label >
80- </div >
81- ```
82- ##### Animated checkbox
83- ``` html
84- <div class =" pretty inline outline-danger smooth" >
85- <input type =" checkbox" >
86- <label ><i class =" mdi mdi-close" ></i > Smooth animation</label >
87- </div >
88- ```
89- ##### Disabled checkbox
90- ``` html
91- <div class =" pretty inline" >
92- <input type =" checkbox" disabled >
93- <label ><i class =" mdi mdi-check" ></i > Disabled</label >
94- </div >
95- ```
96- ##### Toggle checkbox
97- ``` html
98- <div class =" pretty inline toggle" >
99- <input type =" checkbox" />
100- <label ><i class =" mdi mdi-microphone" ></i > ON</label >
101- <label ><i class =" mdi mdi-microphone-off" ></i > OFF</label >
102- </div >
103- ```
104- ##### Toggle checkbox without border
105- ``` html
106- <div class =" pretty inline plain toggle" >
107- <input type =" checkbox" />
108- <label ><i class =" mdi mdi-wifi" ></i > WIFI ON</label >
109- <label ><i class =" mdi mdi-wifi-off" ></i > WIFI OFF</label >
110- </div >
111- ```
112- ##### Toggle checkbox with colors
113- ``` html
114- <div class =" pretty inline plain toggle" >
115- <input type =" checkbox" />
116- <label ><i class =" mdi mdi-play" ></i > Play</label >
117- <label ><i class =" mdi mdi-pause success" ></i > Pause</label >
118- </div >
119- ```
120- ##### Toggle checkbox with alternative colors
121- ``` html
122- <div class =" pretty inline plain toggle" >
123- <input type =" checkbox" />
124- <label ><i class =" mdi mdi-thumb-up success" ></i > Liked</label >
125- <label ><i class =" mdi mdi-thumb-down danger" ></i > Disliked</label >
126- </div >
127- ```
128- ### Radio button Features
129-
130- ##### Basic radio
131- ``` html
132- <div class =" pretty inline circle" >
133- <input type =" radio" name =" radio1" >
134- <label ><i class =" default" ></i > Default</label >
135- </div >
136- <div class =" pretty inline circle" >
137- <input type =" radio" name =" radio1" >
138- <label ><i class =" mdi mdi-check" ></i > With icon</label >
139- </div >
140- ```
141- All the features in the checkbox is supported for radio buttons. It includes
142- ` Boxed radio button ` , ` Solid Color radio ` , ` Outline Color radio ` , ` Radio button without border ` , ` Animated radio button ` , ` Disabled radio button ` , ` Toggle radio button ` .
14355
56+ ##### Radio
14457
145- ##### Toggle radio button without labels
14658``` html
147- <div class =" pretty inline circle plain toggle" >
148- <input type =" radio" name =" radio9" checked >
149- <label ><i class =" mdi mdi-microphone-off" ></i ></label >
150- <label ><i class =" mdi mdi-microphone danger" ></i ></label >
59+ <div class =" pretty" >
60+ <input type =" radio" name =" radio" >
61+ <label ><i class =" mdi mdi-check" ></i > Option 1</label >
15162</div >
152- <div class =" pretty inline circle plain toggle" >
153- <input type =" radio" name =" radio9" >
154- <label ><i class =" mdi mdi-microphone-off" ></i ></label >
155- <label ><i class =" mdi mdi-microphone danger" ></i ></label >
63+ <div class =" pretty" >
64+ <input type =" radio" name =" radio" >
65+ <label ><i class =" mdi mdi-check" ></i > Option 2</label >
15666</div >
15767```
68+ Refer the [ Documentation] ( https://lokesh-coder.github.io/pretty-checkbox/ ) for other features and sass settings.
69+
15870
15971### Custom font library
16072
0 commit comments