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
<fieldset class="form-field-wrapper"> <legend class="block font-medium text-gray-700 mb-2 text-sm"> Playground Group </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="playground_0" name="playground[]" value="Option A" 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="playground_0" class="select-none cursor-pointer text-gray-700 text-sm"> Option a </label> </div> </div> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="playground_1" name="playground[]" value="Option B" 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="playground_1" class="select-none cursor-pointer text-gray-700 text-sm"> Option b </label> </div> </div> <div class="form-field-wrapper"> <div class="flex items-start flex-row gap-2.5"> <input type="checkbox" id="playground_2" name="playground[]" value="Option C" 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="playground_2" class="select-none cursor-pointer text-gray-700 text-sm"> Option c </label> </div> </div> </div></fieldset>1
2
3
4
5
6
7
8
9
10
11
12
render BetterUi::Forms::CheckboxGroupComponent.new( name: "playground", collection: [ "Option A", "Option B", "Option C" ], legend: "Playground Group", variant: variant.to_sym, size: size.to_sym, orientation: orientation.to_sym, disabled: disabled, required: required, hint: with_hint ? "Select one or more options" : nil, errors: with_error ? [ "Please make a selection" ] : nil)No notes provided.
| Param | Description | Input |
|---|---|---|
|
— |
|
|
|
— |
|
|
|
— |
|
|
|
— |
|
|
|
— |
|
|
|
— |
|
|
|
— |
|