Skip to content

cinkagan/react-beautiful-switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beautiful switch with react js

npm

Simple, useful and beautiful switch

Installation

npm install react-beautiful-switch

Usage

import React from "react";
import BeautifulSwitch from "react-beautiful-switch";

function App() {
  return (
    <div className="App">
      <BeautifulSwitch />
    </div>
  );
}

export default App;

Props

Prop Type Default Description
deafultValue bool false If true, the switch is set to checked. If false, it is not checked.
onText string yes will take on this text when it is not checked.
offText string no will take on this text when it is checked.
color string #2d3a87 switch's color. Only accepts hex-colors.
onChange func undefined function to run when switch is changed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published