Skip to main content

Switch

v.2.0.0

Installation

yarn add @mercell/switch-react

Usage

Using the Switch component is as simple as importing it like this.

import Switch from '@mercell/switch-react';
Live Editor
Result

Types, definitions, etc.

SwitchProps
interface SwitchProps {
rightLabel: string;
leftLabel: string;
} & JSX.IntrinsicElements['input']
NameTypeDefaultRequiredDescription
rightLabelstring-yesLabel for the right-position of the switch
leftLabelstring-yesLabel for the left-position of the switch