We The Curious Developers

We The Curious Developers

  • Guidelines
  • CuriOs SDK
  • Software
  • Films
  • Art
  • Audio
  • Photography

›Components

Getting Started

  • Getting Started Overview
  • ClI
  • Working With Us

Technical

  • Hardware

Frames

  • Frames Overview
  • Info Panel
  • Media Browser
  • Touch to Start

Components

  • Components Overview
  • Box
  • Button
  • Card
  • Checkbox
  • Header
  • Heading
  • Hero
  • Icon
  • Text Input
  • Markdown Viewer
  • Modal
  • WTCProvider
  • Table
  • Text
  • Video Player
  • Calendar
  • Dropdown
  • InputAutoComplete
  • Radio
  • Sidebar
  • Slider
  • Notification
  • IconNavButton
  • IconSideBar
  • List
  • Tab
  • Title
  • Toggle
  • Value

We the Curious Toggle

An accessible toggle button component

Install

npm i @wethecurious/wtc-ui-library

Usage

Import it into your project

import { Toggle } from '@wethecurious/wtc-ui-library'

Toggle

// label for screen reader
<label id='a-toggle'>Toggle button: </label>
<Toggle
  labelId='a-toggle'
  isOn={isToggleChecked}
  handleToggle={handleToggle}
/>

Props

PropDescriptionDefault
sizeSets the size of the toggle
inOnSpecifies toggle on/off
handleToggleCallback triggere on toggle click
labelIdId of the toggle label for aria-labelledby
Last updated on 5/8/2019
← TitleValue →
  • Install
  • Usage
    • Toggle
  • Props
Docs
Getting Started (or other categories)Guides (or other categories)API Reference (or other categories)
Community
User ShowcaseStack OverflowProject ChatTwitter
More
BlogGitHubStar
Copyright © 2020 We The Curious