# Interaction >> Switch >> Features ||20 ```js script import { html } from '@lion/core'; import { Validator } from '@lion/form-core'; import { LionSwitch } from '@lion/switch'; import '@lion/switch/define'; import '@lion/helpers/define-sb-action-logger'; ``` ## Disabled You can disable switches. ```js preview-story export const disabled = () => html` `; ``` ## Validation Simple example that illustrates where validation feedback will be displayed. ```js preview-story export const validation = () => { const IsTrue = class extends Validator { static get validatorName() { return 'IsTrue'; } execute(value) { return !value.checked; } static async getMessage() { return "You won't get the latest news!"; } }; const tagName = 'custom-switch'; if (!customElements.get(tagName)) { customElements.define( tagName, class CustomSwitch extends LionSwitch { static get validationTypes() { return [...super.validationTypes, 'info']; } _showFeedbackConditionFor(type) { if (type === 'info') { return true; } return super._showFeedbackConditionFor(type); } }, ); } return html` `; }; ``` ## With checked-changed handler You can listen for a `checked-changed` event that is fired when the switch is clicked. ```js preview-story export const handler = ({ shadowRoot }) => { return html` `; }; ```