Skip to content
R

react-switch

Draggable toggle-switch component for react

by yogabollFree

#189in UI Libraries
0In stores

Description

react-switch is a React toggle-switch component that you can drag with a mouse or a touch screen, as well as click. It is built to be custom…

Highlights

  • Drag with a mouse or a touch screen
  • Customizable size and colors
  • Accessible labelling with label, htmlFor and ARIA
  • Small package with a documented prop API

Ratings & Reviews

No ratings yet

Be the first to rate react-switch.

People also visit

R

react-toggle

An elegant, accessible toggle component for React. Also a glorified checkbox

UI Libraries
Launch
R

react-swipeable-views

A React Component for binded Tabs and Swipeable Views

UI Libraries
Launch
R

react-range

Range input. Slides in all directions

UI Libraries
Launch
R

react-draggable

React draggable component

UI Libraries
Launch
R

react-input-range

React component for inputting numeric values within a range

UI Libraries
Launch
T

toggle-switch-react-native

Toggle Switch component for react native, it works on iOS and Android

UI Libraries
Launch

react-switch FAQ

What is react-switch?

It is a draggable toggle-switch component for React that you can use in forms and settings screens.

Can it be dragged?

Yes. You can drag it with a mouse or a touch screen, and it can also be clicked.

How do I make it accessible?

Nest the switch inside a label element so the label is read out. If you do not nest it, use htmlFor on the label, or aria-labelledby or aria-label on the switch.

Can I change the look?

Yes. Size, color and other appearance settings can be customized through its props.

Where is the documentation?

The README has usage examples, an API table with the props, types and defaults, and a link to the demo page.

What are the best react-switch alternatives?

Popular alternatives to react-switch include react-toggle, react-swipeable-views and react-range. See all react-switch alternatives

Developer Stuff

Badges