# markusenglund/react-switch

A draggable toggle-switch component for React. Check out the demo at:

Repository: https://github.com/markusenglund/react-switch
Canonical: https://ross.abutalabs.com/products/react-switch
Homepage: https://react-switch.netlify.app/
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2024-12-14T17:19:23+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3274, "days_push": 627, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1339, forks 99 (observed 2026-08-28T04:04:25.834891+00:00)

## What it is
A draggable, customizable toggle-switch component for React with built-in accessibility support. It ships as a tiny (<2.5 kB gzipped) npm package using inline styles so no separate CSS import is needed.

## Use cases
- add a toggle switch to a react form
- draggable on/off switch component for react
- accessible toggle button for screen readers
- replace a checkbox with a switch in react
- customize switch size and color in react
- touch-friendly toggle switch for mobile web

## When to choose
- you need a small, dependency-free React switch with sensible defaults
- accessibility (screen readers, keyboard/touch) is a requirement
- you want drag interaction and easy styling customization

## When to avoid
- you are not using React
- you need a full component library with many UI primitives
- you need CSS-module or stylesheet-based theming rather than inline styles

## Facets
- artifact type: library
- maturity: maintenance
- function: ui-components, form-handling
- domain: frontend, web-development, accessibility
- platform: browser, cross-platform
- tags: react, toggle-switch, draggable, react-component, checkbox, nodejs

## Member repositories
- markusenglund/react-switch (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:25.834891+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:43:55.415690+00:00, confidence not recorded.
  - readme: https://github.com/markusenglund/react-switch (fetched 2026-08-28T04:04:25.834891+00:00, sha 2e044a851c5a)
  - homepage: https://react-switch.netlify.app/ (fetched 2026-08-29T12:03:16.342257+00:00, sha fdd66e62b856)
  - registry_npm: https://registry.npmjs.org/react-switch (fetched 2026-08-29T12:03:16.351319+00:00, sha 285ed55a5424)
- Data as of 2026-08-30T08:39:29.467469+00:00.
