MvCheckbox is a Meveo checkbox component (based on lit-element) that renders a checkbox input.
- Simple interface
- Dispatches a custom event when checkbox is clicked
To experiment with the MvCheckbox component.
-
Clone this repo.
-
Serve the project from the root directory with some http server (best served with meveo itself)
-
Update the checkbox demo component in demo.js file
<mv-checkbox
.value="${{ isChecked: !this.checked }}" // value can be any object
.checked="${!!this.checked}" // checked is a boolean that determines whether the checkbox is selected or not
@click-checkbox="${this.handleClickCheckbox}" // custom event dispatched when the checkbox is clicked
label="Checked?" // string label for the checkbox
></mv-checkbox>
You can also check this demo