x
1
2
3
4
<div class="c-checkbox"> <label for="accepted" class="c-checkbox__label">Accepted?</label> <input aria-required="false" class="c-checkbox__control" id="accepted" name="accepted" type="checkbox" value="y"></div>
1
render(Checkbox::Component.new(attributes:, id:, label:, name:, required:, value:))
Checkbox
A minimal checkbox.
Param | Description | Input |
---|---|---|
Additional attributes for the checkbox as a key/value hash. |
|
|
The ID attribute for the checkbox. |
|
|
The label for the checkbox. |
|
|
The name attribute for the checkbox. |
|
|
Is the checkbox required? |
|
|
Value for the selected checkbox. |
|