Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

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

🎨 Help the user picking beautiful colors!

License

NotificationsYou must be signed in to change notification settings

saintplay/vue-swatches

Repository files navigation


Vue Swatches

Travis CInpm versionCoverage StatuslicenseJest

Notice

Vue Swatches recently reachedversion 2. If you were using v1 please consider reading therelease notes or you can check v1here

Demo And Documentation

https://saintplay.github.io/vue-swatches/

Table of Contents

Introduction

Vue Swatches is a UI Component for Vue that allows the user to choose colors.

Unlike classic color pickers, where all colors are available (167 77 216 colors),Vue Swatches only shows a bunch of predefined colors.

More decisions require more effort

With fewer options, the user experience will be improved

Features

Install

npm install --save vue-swatches

or

yarn add vue-swatches

Basic Usage

<!-- Vue component --><template>  <div>    <v-swatches v-model="color"></v-swatches>  </div></template><script>  import VSwatches from 'vue-swatches'  // Import the styles too, globally  import "vue-swatches/dist/vue-swatches.css"  export default {    components: { VSwatches }, // window['vue-swatches'] - from CDN    data () {      return {        color: '#1CA085'      }    }  }</script>

Contributing

# serve with hot reload at localhost:8080yarn serve# distribution build with minificationyarn build# build the documentation into docsnpm docs:dev# run unit testsyarn test:unit

Browser Compatibility

This component has the same support than Vue itself

Vue does not support IE8 and below, because it uses ECMAScript 5 features that are un-shimmable in IE8. However it supports allECMAScript 5 compliant browsers.

However if you want to use this with IE9, you will probably need to work on the CSS styles.IE10 should be fine

Awesome Contributors

License

MIT


[8]ページ先頭

©2009-2025 Movatter.jp