<p>
  <img width="100%" src="https://assets.solidjs.com/banner?type=Aria&background=tiles&project=Toggle" alt="Solid Aria - Toggle">
</p>

# @solid-aria/toggle

[![pnpm](https://img.shields.io/badge/maintained%20with-pnpm-cc00ff.svg?style=for-the-badge&logo=pnpm)](https://pnpm.io/)
[![turborepo](https://img.shields.io/badge/built%20with-turborepo-cc00ff.svg?style=for-the-badge&logo=turborepo)](https://turborepo.org/)
[![size](https://img.shields.io/bundlephobia/minzip/@solid-aria/toggle?style=for-the-badge&label=size)](https://bundlephobia.com/package/@solid-aria/toggle)
[![version](https://img.shields.io/npm/v/@solid-aria/toggle?style=for-the-badge)](https://www.npmjs.com/package/@solid-aria/toggle)
[![stage](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-0.json)](https://github.com/solidjs-community/solid-aria#contribution-process)

Primitives for building toggle components like checkboxes and switches.

## Installation

```bash
npm install @solid-aria/toggle
# or
yarn add @solid-aria/toggle
# or
pnpm add @solid-aria/toggle
```

## `createToggleState`

Provides state management for toggle components like checkboxes and switches.

### How to use it

See the docs of [createCheckbox](../checkbox) for an example of `createToggleState`.

## `createToggle`

Handles interactions for toggle elements, e.g. Checkboxes and Switches.

### How to use it

See the docs of [createCheckbox](../checkbox) for an example of `createToggle`.

## Changelog

All notable changes are described in the [CHANGELOG.md](./CHANGELOG.md) file.
