Consents Checkbox¶
This webcomponent is responsible for rendering a checkbox for consents. It uses form control styles and is used in consents-modal webcomponent.
Attributes¶
Attribute name | Type | Description |
---|---|---|
name (mandatory) | string |
The unique name of the consent checkbox |
disabled | boolean |
If set to true the checkbox will be disabled |
checked | boolean |
If set to true the checkbox will be checked |
label | string |
The optional label of the checkbox |
DOM Events¶
This webcomponent dispatches the following DOM events:
Example¶
<div class="control">
<div class="control__element control__element_checkbox">
<div>
<div class="checkbox__control">
<input class="checkbox__input" type="checkbox" id="exampleName" name="exampleName"/>
<label class="checkbox__label" for="${this.name}"></label>
</div>
<div class="checkbox__content">
<label class="label" for="exampleName">Consent checkbox label</label>
<div class="checkbox__description">
<div>Consent</div>
</div>
</div>
</div>
</div>
</div>