@hixme-ui/toggle

hixme-ui Toggle component

Usage no npm install needed!

<script type="module">
  import hixmeUiToggle from 'https://cdn.skypack.dev/@hixme-ui/toggle';
</script>

README

Toggle

Installation

npm i --save @hixme-ui/toggle

View it live

Usage

import Toggle from '@hixme-ui/toggle'

<Toggle
  checked={this.state.checked}
  truthyText='Ya'
  falsyText='Nah'
  onChange={e => this.handleToggle(e)}
/>

Props

Name Type Default
truthyText string 'Yes'
falsyText string 'No'
checked boolean undefined
noLabels boolean false
withIcons boolean false