1
1
# Pretty checkbox
2
2
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** !
4
4
5
5
Check it out the [ Demo] ( https://lokesh-coder.github.io/pretty-checkbox/ ) for complete documentation.
6
6
7
7
### Get started
8
8
9
- Install the library from ` bower ` or ` npm ` package manager
9
+ Install the library from ` bower ` , ` npm ` or ` yarn ` package manager
10
10
11
11
``` sh
12
12
> bower install pretty-checkbox
13
13
```
14
14
``` sh
15
15
> npm install pretty-checkbox
16
16
```
17
+ ``` sh
18
+ > yarn add pretty-checkbox
19
+ ```
17
20
Add ` pretty.min.css ` in your html
18
21
19
- From CDN,
22
+ From CDN,
20
23
``` 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" />
22
25
```
23
26
or from the source,
24
27
``` html
@@ -34,127 +37,36 @@ You can also import `pretty.scss` in your main scss file.
34
37
Checkbox markup,
35
38
``` html
36
39
<div class =" pretty" >
37
- <input type =" checkbox" />
40
+ <input type =" checkbox" />
38
41
<label ><i class =" mdi mdi-check" ></i > Buy vegetables</label >
39
42
</div >
40
43
```
41
44
42
- ### checkbox Features
45
+ ### Basic examples
43
46
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
58
48
59
- ##### Solid Checkbox color
60
49
``` html
61
- <div class =" pretty inline primary" >
62
- <input type =" checkbox" />
50
+ <div class =" pretty primary" >
51
+ <input type =" checkbox" />
63
52
<label ><i class =" mdi mdi-check" ></i > Primary</label >
64
53
</div >
65
54
```
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 ` .
143
55
56
+ ##### Radio
144
57
145
- ##### Toggle radio button without labels
146
58
``` 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 >
151
62
</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 >
156
66
</div >
157
67
```
68
+ Refer the [ Documentation] ( https://lokesh-coder.github.io/pretty-checkbox/ ) for other features and sass settings.
69
+
158
70
159
71
### Custom font library
160
72
0 commit comments