Svelte Toggle

screenshot of Svelte Toggle
svelte
vite

Accessible toggle switch component

Overview

The Svelte Toggle component is an accessible toggle switch that implements the recommended accessibility practices for toggle buttons according to the Inclusive Components guide.

Features

  • Toggles the component by default
  • Supports two-way binding for the toggled state
  • Allows customization of toggle switch descriptors, small variant, colors, label text, and hidden label
  • Provides a disabled state for the toggle switch
  • Can be fully controlled and styled by the user

Summary

The Svelte Toggle component is an accessible and customizable toggle switch that follows recommended accessibility practices. It provides various features such as default toggled state, two-way binding, customizable descriptors, colors, label text, and more. The component can be installed and used easily in a Svelte project.

svelte
Svelte

Svelte is a modern front-end framework that compiles your code at build time, resulting in smaller and faster applications. It uses a reactive approach to update the DOM, allowing for high performance and a smoother user experience.

vite
Vite

Vite is a build tool that aims to provide a faster and leaner development experience for modern web projects

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.