react-togglelabels

1.0.3 • Public • Published

Toggle Labels Build Status License

Toggle Button between two options with flexibility to assign labels to the two options for toggle, rather than the generic 'ON/OFF'

Example :

<Toggle
    defaultOption="STRING"
    otherOption="INT"
    onChange={this.handleChange}
/>

Currently it takes in 3 props:

  1. defaultOption : The default selected Option/label in Toggle
  2. otherOption : The second option/label in Toggle
  3. onChange : On shifting the toggle button

Example view

Updates Coming Soon: Color and Style Selection via props

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i react-togglelabels

      Weekly Downloads

      5

      Version

      1.0.3

      License

      ISC

      Unpacked Size

      109 kB

      Total Files

      8

      Last publish

      Collaborators

      • rgishere