vue-native-color-picker

2.0.0 • Public • Published

vue-native-color-picker

Lightweight color picker that uses the native HTML element input type color.

npm version Deploy to github pages


Demo

Install

npm install vue-native-color-picker

Import

Globally:

import InputColorPicker from "./vue-input-color-picker";
Vue.use(InputColorPicker);

Or locally:

<script setup>
import { ref } from "vue";
import InputColorPicker from "./components/InputColorPicker.vue";

const color = ref("#0f4c81");
const handleInput = (e) => {
  console.log("You input", e.target.value);
};

const handleChange = (e) => {
  console.log("You picked", e.target.value);
};
</script>

Use

<InputColorPicker v-model="color" />

or if you wish to handle the values externally:

<InputColorPicker v-model="color" @input="handleInput" @change="handleChange" />

Readme

Keywords

none

Package Sidebar

Install

npm i vue-native-color-picker

Weekly Downloads

929

Version

2.0.0

License

none

Unpacked Size

19.1 kB

Total Files

7

Last publish

Collaborators

  • dcustodio