Nerdy Poly Millionaires

    react-styled-toggle
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.18 • Public • Published

    React styled toggle

    npm version npm version code style: prettier style: styled-components jest

    Demo

    codesandebox

    storybook

    Installation

    yarn add react-styled-toggle
    

    Usage

    import Toggle from 'react-styled-toggle';
    
    render(){
        return <Toggle />
    }
    

    Development

    yarn storybook
    

    Build

    yarn build
    

    Props

    propertypropTyperequireddefaultdescription
    checkedbool--
    disabledbool--
    onChangefunc--
    backgroundColorCheckedstring-"'#2193F3'"
    backgroundColorUncheckedstring-"'#ccc'"
    backgroundColorButtonstring-"'#fff'"
    namestring--
    valuestring--
    labelRightstring--
    labelLeftstring--
    sliderWidthnumber-"26"
    sliderHeightnumber-"26"
    widthnumber-"60"
    heightnumber-"34"
    translatenumber-"26"

    Install

    npm i react-styled-toggle

    DownloadsWeekly Downloads

    346

    Version

    1.0.18

    License

    ISC

    Unpacked Size

    13 kB

    Total Files

    6

    Last publish

    Collaborators

    • guillaumemorin