Skip to content

marcus-herrmann/vue-switch-button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm version Build Status

Vue Switch Button

Accessible toggle switch button, see https://inclusive-components.design/toggle-button/

Screenshot

Demo

Installation:

npm install vue-switch-button --save

Usage

<switch-button value="true"> 
    Notify by mounted messenger
</switch-button>

<switch-button v-model="email">
    Notify by email
</switch-button>

<switch-button v-model="pidgeon" on-label="Yes" off-label="No">
  Notify by pidgeon
</switch-button>

Properties

Name Type Default Description
value Boolean false Initial state of the toggle button
onLabel String "on" Label for checked state
offLabel String "off" Label for unchecked state

Events

Name Description
click Triggered whenever state of the component changes.

Releases

No releases published

Packages

No packages published