vue3-swatches
🎨 Vue 3 swatch picker
449,653
| Install | |
|---|---|
npm install vue3-swatches |
|
| Latest Version: | 1.2.4 |
| Vue: | 3 |
| Last Updated: | Feb 2, 2024 |
| Links: | npm |
Maintainer: wobsoriano
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
pnpm add vue3-swatches
Example
Install as a global plugin (Optional)
// main.js
import { createApp } from 'vue'
import VSwatches from 'vue3-swatches'
import 'vue3-swatches/dist/style.css'
const app = createApp(App)
app.use(VSwatches)
or import it locally
<script setup>
import { ref } from 'vue'
import { VSwatches } from 'vue3-swatches'
import 'vue3-swatches/dist/style.css'
const color = ref("#1FBC9C")
</script>
<template>
<VSwatches v-model="color" />
</template>
Using a Custom Trigger
<template>
<VSwatches v-model="color">
<template #trigger>
<input :value="color" readonly />
</template>
</VSwatches>
</template>
Nuxt
export default defineNuxtConfig({
modules: ['vue3-swatches/nuxt']
})
Head over to https://saintplay.github.io/vue-swatches/ for the complete documentation.
License
MIT
Related Packages
Version History
| Version | Released | License |
|---|---|---|
| 1.2.4 | ||
| 1.2.3 | ||
| 1.2.2 | ||
| 1.2.1 | ||
| 1.1.3 | ||
| 1.1.2 | ||
| 1.1.1 | ||
| 1.1.0 | ||
| 1.0.10 | ||
| 1.0.8 | MIT | |
| 1.0.7 | MIT | |
| 1.0.5 | ||
| 1.0.4 | ||
| 1.0.3 | ||
| 1.0.2 | ||
| 1.0.1 | ||
| 1.0.0 |