@finastra/switch
TypeScript icon, indicating that this package has built-in type declarations

1.8.1 • Public • Published

Switch

See it on NPM! How big is this package in your project? Storybook

fds-switch toggles the state of a single setting on or off.

It extends Material web's mwc-switch-base

Usage

Import

npm i @finastra/switch
import '@finastra/switch';
...
<fds-switch selected></fds-switch>

API

Properties

Property Attribute Modifiers Type Default Description
ariaLabel string
ariaLabelledBy string
disabled disabled boolean false Indicates whether or not the switch is disabled.
name string
processing boolean Indicates whether or not the switch is processing and showing a loading
indicator. A disabled switch cannot be processing.
ripple readonly Promise<Ripple | null> Implement ripple getter for Ripple integration with mwc-formfield
selected selected boolean false If true, the switch is on. If false, the switch is off.
styles CSSResult[] ["styles"]
value string

Methods

Method Type
click (): void

CSS Custom Properties

Property Type Default Description
--fds-primary color "#694ED6" Switch color
--fds-track-opacity color 0.54 Track color opacity

Package Sidebar

Install

npm i @finastra/switch

Weekly Downloads

2

Version

1.8.1

License

MIT

Unpacked Size

43.5 kB

Total Files

17

Last publish

Collaborators

  • david.bocle
  • ffdcbot
  • ttalbot