Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A toggle button for simple state management.

NotificationsYou must be signed in to change notification settings

vue-comps/vue-toggle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-toggle

A toggle button for simple state management.

Install

npm install --save-dev vue-toggle

or includebuild/bundle.js.

Usage

# in your componentcomponents:"toggle":require("vue-toggle")# or, when using bundle.jscomponents:"toggle":window.vueComps.toggle
<toggle>  click to switch<spanslot="on"> off</span><spanslot="off"> on</span></toggle>

For examples seedev/.

Props

Nametypedefaultdescription
is-onBooleanfalse(two-way) toggle state
on-classString"on"class of button when on
off-classString"off"class of button when off
disabledBooleanfalseis disabled

Events

| Name | description || ---:| --- | ---| --- || off | will be emitted on click when state was on || on | will be emitted on click when state was off || toggle | will be emitted on click |

Development

Clone repository.

npm installnpm run dev

Browse tohttp://localhost:8080/.

License

Copyright (c) 2016 Paul PflugradtLicensed under the MIT license.

About

A toggle button for simple state management.

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp