Svelte Component

Slide Toggles

A sliding toggle element that can capture input from a user.

typescript
import { SlideToggle } from '@skeletonlabs/skeleton';
Source Page Source WAI-ARIA

Demo

This component provides an alternative UI for a checkbox input element.

Labeled

Customized

Slide toggles styles and colors can be easily customized with the active and size properties.

Checkbox Attributes

This component supports Svelte's $$restProps, which allows for required, disabled, and any other valid checkbox input attributes.

html
<SlideToggle ... required disabled />