x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<div class="space-y-8 p-4"> <div> <h4 class="text-sm font-medium text-gray-700 mb-2">Vertical Orientation (Default)</h4> <fieldset class="form-field-wrapper"> <legend class="block font-medium text-gray-700 mb-2 text-sm"> Vertical Layout </legend> <div class="flex flex-col gap-2.5"> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="vertical_options_0" name="vertical_options[]" value="Option 1" checked="checked" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="vertical_options_0" class="select-none cursor-pointer text-gray-700 text-sm"> Option 1 </label> </div> </div> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="vertical_options_1" name="vertical_options[]" value="Option 2" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="vertical_options_1" class="select-none cursor-pointer text-gray-700 text-sm"> Option 2 </label> </div> </div> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="vertical_options_2" name="vertical_options[]" value="Option 3" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="vertical_options_2" class="select-none cursor-pointer text-gray-700 text-sm"> Option 3 </label> </div> </div> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="vertical_options_3" name="vertical_options[]" value="Option 4" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="vertical_options_3" class="select-none cursor-pointer text-gray-700 text-sm"> Option 4 </label> </div> </div> </div> </fieldset> </div> <div> <h4 class="text-sm font-medium text-gray-700 mb-2">Horizontal Orientation</h4> <fieldset class="form-field-wrapper"> <legend class="block font-medium text-gray-700 mb-2 text-sm"> Horizontal Layout </legend> <div class="flex flex-row flex-wrap gap-x-6 gap-y-2.5"> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="horizontal_options_0" name="horizontal_options[]" value="Option 1" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="horizontal_options_0" class="select-none cursor-pointer text-gray-700 text-sm"> Option 1 </label> </div> </div> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="horizontal_options_1" name="horizontal_options[]" value="Option 2" checked="checked" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="horizontal_options_1" class="select-none cursor-pointer text-gray-700 text-sm"> Option 2 </label> </div> </div> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="horizontal_options_2" name="horizontal_options[]" value="Option 3" checked="checked" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="horizontal_options_2" class="select-none cursor-pointer text-gray-700 text-sm"> Option 3 </label> </div> </div> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="horizontal_options_3" name="horizontal_options[]" value="Option 4" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="horizontal_options_3" class="select-none cursor-pointer text-gray-700 text-sm"> Option 4 </label> </div> </div> </div> </fieldset> </div> <div> <h4 class="text-sm font-medium text-gray-700 mb-2">Horizontal with Many Options (Wraps)</h4> <fieldset class="form-field-wrapper"> <legend class="block font-medium text-gray-700 mb-2 text-sm"> Days of Week </legend> <div class="flex flex-row flex-wrap gap-x-6 gap-y-2.5"> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="many_options_0" name="many_options[]" value="Mon" checked="checked" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="many_options_0" class="select-none cursor-pointer text-gray-700 text-sm"> Mon </label> </div> </div> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="many_options_1" name="many_options[]" value="Tue" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="many_options_1" class="select-none cursor-pointer text-gray-700 text-sm"> Tue </label> </div> </div> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="many_options_2" name="many_options[]" value="Wed" checked="checked" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="many_options_2" class="select-none cursor-pointer text-gray-700 text-sm"> Wed </label> </div> </div> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="many_options_3" name="many_options[]" value="Thu" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="many_options_3" class="select-none cursor-pointer text-gray-700 text-sm"> Thu </label> </div> </div> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="many_options_4" name="many_options[]" value="Fri" checked="checked" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="many_options_4" class="select-none cursor-pointer text-gray-700 text-sm"> Fri </label> </div> </div> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="many_options_5" name="many_options[]" value="Sat" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="many_options_5" class="select-none cursor-pointer text-gray-700 text-sm"> Sat </label> </div> </div> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="many_options_6" name="many_options[]" value="Sun" class="appearance-none shrink-0 rounded border cursor-pointer transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 w-5 h-5 border-gray-300 checked:bg-primary-600 checked:border-primary-600 focus:ring-primary-500 bg-white" /> <label for="many_options_6" class="select-none cursor-pointer text-gray-700 text-sm"> Sun </label> </div> </div> </div> </fieldset> </div></div>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<div class="space-y-8 p-4"> <div> <h4 class="text-sm font-medium text-gray-700 mb-2">Vertical Orientation (Default)</h4> <%= render BetterUi::Forms::CheckboxGroupComponent.new( name: "vertical_options", collection: ["Option 1", "Option 2", "Option 3", "Option 4"], selected: ["Option 1"], legend: "Vertical Layout", orientation: :vertical ) %> </div> <div> <h4 class="text-sm font-medium text-gray-700 mb-2">Horizontal Orientation</h4> <%= render BetterUi::Forms::CheckboxGroupComponent.new( name: "horizontal_options", collection: ["Option 1", "Option 2", "Option 3", "Option 4"], selected: ["Option 2", "Option 3"], legend: "Horizontal Layout", orientation: :horizontal ) %> </div> <div> <h4 class="text-sm font-medium text-gray-700 mb-2">Horizontal with Many Options (Wraps)</h4> <%= render BetterUi::Forms::CheckboxGroupComponent.new( name: "many_options", collection: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], selected: ["Mon", "Wed", "Fri"], legend: "Days of Week", orientation: :horizontal ) %> </div></div>No notes provided.
No params configured.