Socket
Socket
Sign inDemoInstall

@lion/switch

Package Overview
Dependencies
10
Maintainers
3
Versions
132
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @lion/switch

A Switch is used for switching a property or feature on and off


Version published
Weekly downloads
642
decreased by-9.07%
Maintainers
3
Created
Weekly downloads
 

Readme

Source

Interaction >> Switch >> Overview ||10

A web component that is used to toggle a property or feature on or off. Toggling the component on or off should have immediate action and should not require pressing any additional buttons (submit) to confirm what just happened. Switch is not a Checkbox in disguise and should not be used as part of a form.

import { html } from '@lion/core';
import '@lion/switch/define';
export const main = () => html` <lion-switch label="Label" help-text="Help text"></lion-switch> `;

Features

  • Get or set the checked state (boolean) - checked boolean attribute
  • Pre-select an option by setting the checked boolean attribute
  • Get or set the value of the choice - choiceValue()

Installation

npm i --save @lion/switch
import { LionSwitch } from '@lion/switch';
// or
import '@lion/switch/define';

Keywords

FAQs

Last updated on 13 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc