Checkbox
The Checkbox control allows selecting one or several options from a number of options. You can set a value associated with a checkbox for form submitting. The control's API allows you to render checkboxes as already checked or disabled and adjust the appearance of a checkbox by applying a custom style and adding a text label.
Related resources
- Get the widget by installing the
@svar-ui/svelte-corepackage. - Check Checkbox API Reference to see the list of configuration properties and events.
- Explore the samples to visualize the available features.
Initialization
To add a Checkbox instance into your application, you need to complete two steps:
- import the source file of the control on a page:
App.svelte
<script>
import { Checkbox } from "@svar-ui/svelte-core";
</script>
- apply the
<Checkbox>tag to initialize a checkbox:
App.svelte
<Checkbox />
A default checkbox is rendered unchecked with no label.