Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

Latest commit

 

History

History
58 lines (35 loc) · 1.72 KB

switch.md

File metadata and controls

58 lines (35 loc) · 1.72 KB

Switch

Form control to toggle the state of a single option. Generates a styled checkbox input element.

Main features

  • All Checkbox main features
  • Custom icon
  • Custom z-depths
  • Disable shadow
  • RTL (right-to-left) support

Usage

Identical to Checkbox. See Checkbox usage instructions and replace "Checkbox" with "Switch".

Options

See: Checkbox

Switch specific options

Parameter Required Type Default Description
raised optional Boolean true Shows a shadow below the thumb; when the Switch state is on, the depth is incremented by 1
wash optional Boolean true on touch devices Set to false to always hide the wash (radial feedback); note that a (hidden) wash is still drawn to create a large tap target
shadowDepthOff optional Number 0-5 1 The shadow depth for the thumb in off state
shadowDepthOn optional Number 0-5 2 The shadow depth for the thumb in on state

CSS classes