sterling-svelte  1.0.12
A modern, accessible, lightweight UI component library for Svelte.

Checkbox

An <input type='checkbox'>: an interactive element to select/deselect a value

Code
<script lang="ts">
  import { Checkbox } from '@geoffcox/sterling-svelte';
</script>

<Checkbox>sterling-svelte</Checkbox>

Members

Property Name Type Default Comment
variant string '' Additional class names to apply

Considerations

  • Includes HTMLInputElement props, event, and methods

Anatomy

<div class="sterling-checkbox">
  <div class="container">
    <!-- hidden-->
    <input />
    <div class="indicator" />
  </div>
  <label>
    <slot {checked} {disabled} {inputId} {value} {variant} />
  </label>
</div>