Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcus-herrmann/vue-switch-button
Accessible toggle button component for Vue 2
https://github.com/marcus-herrmann/vue-switch-button
a11y accessibility toggle-buttons toggle-switches vuejs
Last synced: about 1 month ago
JSON representation
Accessible toggle button component for Vue 2
- Host: GitHub
- URL: https://github.com/marcus-herrmann/vue-switch-button
- Owner: marcus-herrmann
- License: mit
- Created: 2018-11-22T18:47:19.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-25T10:55:08.000Z (about 6 years ago)
- Last Synced: 2024-10-07T02:36:58.697Z (3 months ago)
- Topics: a11y, accessibility, toggle-buttons, toggle-switches, vuejs
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-a11y-vue - vue-switch-button - Accessible toggle button component for Vue 2. (Components and plugins / Courses)
- awesome-access - vue-switch-button - Accessible toggle button component for Vue 2. (Components and plugins / Courses)
README
[![npm version](https://badge.fury.io/js/vue-switch-button.svg)](https://badge.fury.io/js/vue-switch-button)
[![Build Status](https://travis-ci.org/marcus-herrmann/vue-switch-button.svg?branch=master)](https://travis-ci.org/marcus-herrmann/vue-switch-button)# Vue Switch Button
Accessible toggle switch button, see https://inclusive-components.design/toggle-button/
![Screenshot](https://i.imgur.com/6tI3r2i.png)
[**Demo**](https://codesandbox.io/s/2v7927pjjr)
## Installation:
```bash
npm install vue-switch-button --save
```## Usage
```xml
Notify by mounted messengerNotify by email
Notify by pidgeon
```
## 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. |