Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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 messenger

Notify 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. |