can
Version:
MIT-licensed, client-side, JavaScript framework that makes building rich web applications easy.
23 lines (19 loc) • 565 B
HTML
<my-checkbox></my-checkbox>
<script src="../../node_modules/steal/steal.js" dev-bundle main="@empty" id="demo-source">
import { StacheElement } from "can";
class MyCheckbox extends StacheElement {
static view = `
<label>
<input type="checkbox" checked:bind="this.isItChecked">
checked:bind="this.isItChecked"
</label>
<p>
is it checked? {{ this.isItChecked }}
</p>
`;
static props = {
isItChecked: false
};
};
customElements.define("my-checkbox", MyCheckbox);
</script>