JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4882
  • Score
    100M100P100Q122834F

🎨 Vue 3 swatch picker

Package Exports

  • vue3-swatches

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue3-swatches) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

vue3-swatches

🎨 Vue 3 swatch picker

Though not a fork, this package is a complete copy of vue-swatches made to work with Vue 3.

Install

yarn add vue3-swatches

Example

Install as a global plugin (Optional)

// main.js
import { createApp } from 'vue'
import VSwatches from 'vue3-swatches'

const app = createApp(App)
app.use(VSwatches)

Or: Import and register it locally

<template>
  <VSwatches v-model="color" />
</template>

<script>
import { defineComponent, ref } from 'vue'
import VSwatches from 'vue3-swatches'

export default defineComponent({
  components: { VSwatches },
  setup() {
    const color = ref('#1FBC9C')

    return {
      color
    }
  }
})
</script>

Head over to https://saintplay.github.io/vue-swatches/ for the complete documentation.

License

MIT License.