@lion/switch
Advanced tools
Weekly downloads
Changelog
@lion/switch@0.21.2
Readme
The Switch is used to toggle a property or feature on or off.
import { html as previewHtml } from '@mdjs/mdjs-preview';
import '@lion/switch/define-switch';
import { html, LitElement, ScopedElementsMixin } from '@lion/core';
import { LionSwitch } from '@lion/switch';
class MyComponent extends ScopedElementsMixin(LitElement) {
static get scopedElements() {
return { 'lion-switch': LionSwitch };
}
render() {
return html`<lion-switch label="Label" help-text="Help text"></lion-switch>`;
}
}
customElements.define('my-component', MyComponent);
export const main = () => previewHtml`<my-component></my-component>`;
checked
boolean attributechecked
boolean attributechoiceValue()
npm i --save @lion/switch
import { html, LitElement, ScopedElementsMixin } from '@lion/core';
import { LionSwitch } from '@lion/switch';
class MyComponent extends ScopedElementsMixin(LitElement) {
static get scopedElements() {
return { 'lion-switch': LionSwitch };
}
render() {
return html`<lion-switch></lion-switch>`;
}
}
<script type="module">
import '@lion/switch/define-switch';
</script>
<lion-switch></lion-switch>
FAQs
A Switch is used for switching a property or feature on and off
The npm package @lion/switch receives a total of 426 weekly downloads. As such, @lion/switch popularity was classified as not popular.
We found that @lion/switch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.