You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/site/content/examples/binding-input-checkbox-group/App.html

16 lines
296 B

<label>
<input type=checkbox bind:group={selected} value="red">
red
</label>
<label>
<input type=checkbox bind:group={selected} value="green">
green
</label>
<label>
<input type=checkbox bind:group={selected} value="blue">
blue
</label>
<p>{selected.join(', ') || 'nothing'} selected</p>