<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>Installation | v-toggle-switch</title> <meta name="generator" content="VuePress 1.8.0"> <meta name="description" content="Simple, yet configurable toggle switch component with accessibility out of the box!"> <meta name="theme-color" content="#3eaf7c"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <link rel="preload" href="/assets/css/0.styles.cfca41b8.css" as="style"><link rel="preload" href="/assets/js/app.b297c1fe.js" as="script"><link rel="preload" href="/assets/js/2.812d8c3e.js" as="script"><link rel="preload" href="/assets/js/14.e1252d4d.js" as="script"><link rel="prefetch" href="/assets/js/10.f6f0015e.js"><link rel="prefetch" href="/assets/js/11.601dd9db.js"><link rel="prefetch" href="/assets/js/12.351b1666.js"><link rel="prefetch" href="/assets/js/13.f771dbb7.js"><link rel="prefetch" href="/assets/js/15.ca491376.js"><link rel="prefetch" href="/assets/js/16.a791a7aa.js"><link rel="prefetch" href="/assets/js/3.bf7e24a9.js"><link rel="prefetch" href="/assets/js/4.60026e53.js"><link rel="prefetch" href="/assets/js/5.de78bb05.js"><link rel="prefetch" href="/assets/js/6.d43349ca.js"><link rel="prefetch" href="/assets/js/7.0576a861.js"><link rel="prefetch" href="/assets/js/8.2f8b26e5.js"><link rel="prefetch" href="/assets/js/9.3a1b03c0.js"> <link rel="stylesheet" href="/assets/css/0.styles.cfca41b8.css"> </head> <body> <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">v-toggle-switch</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/guide/" class="nav-link router-link-active"> Guide </a></div><div class="nav-item"><a href="/examples/" class="nav-link"> Examples </a></div> <a href="https://github.com/mattzahel/v-toggle-switch" target="_blank" rel="noopener noreferrer" class="repo-link"> GitHub <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/guide/" class="nav-link router-link-active"> Guide </a></div><div class="nav-item"><a href="/examples/" class="nav-link"> Examples </a></div> <a href="https://github.com/mattzahel/v-toggle-switch" target="_blank" rel="noopener noreferrer" class="repo-link"> GitHub <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>Guide</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/guide/installation.html" class="active sidebar-link">Installation</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/guide/installation.html#install" class="sidebar-link">Install</a></li><li class="sidebar-sub-header"><a href="/guide/installation.html#import" class="sidebar-link">Import</a></li></ul></li><li><a href="/guide/usage.html" class="sidebar-link">Usage</a></li><li><a href="/guide/customization.html" class="sidebar-link">Customization</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>Examples</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/examples/" class="sidebar-link">Examples</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="installation"><a href="#installation" class="header-anchor">#</a> Installation</h1> <h2 id="install"><a href="#install" class="header-anchor">#</a> Install</h2> <p>Use <code>npm install v-toggle-switch</code> or <code>yarn add v-toggle-switch</code></p> <h2 id="import"><a href="#import" class="header-anchor">#</a> Import</h2> <ul><li>locally</li></ul> <div class="language- extra-class"><pre class="language-text"><code>import ToggleSwitch from 'v-toggle-switch' export default { components: { ToggleSwitch } } </code></pre></div><ul><li>or globally</li></ul> <div class="language- extra-class"><pre class="language-text"><code>import ToggleSwitch from 'v-toggle-switch' Vue.use(ToggleSwitch) </code></pre></div></div> <footer class="page-edit"><!----> <!----></footer> <!----> </main></div><div class="global-ui"></div></div> <script src="/assets/js/app.b297c1fe.js" defer></script><script src="/assets/js/2.812d8c3e.js" defer></script><script src="/assets/js/14.e1252d4d.js" defer></script> </body> </html>