npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@radial-color-picker/vue-color-picker

v6.0.0

Published

Radial Color Picker - Vue

Downloads

1,469

Readme

Radial Color Picker - Vue

Introduction

Great UX starts with two basic principles - ease of use and simplicity. Selecting a color should be as easy as moving a slider, clicking a checkbox or pressing a key just like other basic form elements behave.

This is a flexible and minimalistic color picker. Developed with mobile devices and keyboard usage in mind. Key features:

  • Small size - 3.3 KB gzipped (JS and CSS combined)
  • Supports touch devices
  • Optimized animations
  • Ease of use
    • Screen reader support.
    • Tab to focus the picker.
    • or arrow key to increase hue. PgUp to go quicker.
    • or arrow key to decrease hue. PgDown to go quicker.
    • Enter to select a color and close the picker or to open it.
    • Mouse ScrollUp to increase and ScrollDown to decrease hue (Opt-in).
  • TypeScript support

Documentation

You can find the documentation on the website. The documentation is divided into several sections:

Ecosystem

The right color picker, but not the framework you're looking for?

Demos

Usage

Color Picker on npm

npm install @radial-color-picker/vue-color-picker

And in your app:

<template>
    <ColorPicker v-bind="color" @input="onInput" />
</template>

<script>
    import { reactive } from 'vue';
    import ColorPicker from '@radial-color-picker/vue-color-picker';
    import '@radial-color-picker/vue-color-picker/dist/vue-color-picker.min.css';

    export default {
        components: { ColorPicker },
        setup() {
            const color = reactive({
                hue: 50,
                saturation: 100,
                luminosity: 50,
                alpha: 1,
            });

            return {
                color,
                onInput(hue) {
                    color.hue = hue;
                },
            };
        },
    };
</script>

Change log

Please see Releases for more information on what has changed recently.

Vue 3 and @vue/compat

If your app isn't ready to upgrade to Vue 3 you can slowly transition via @vue/compat and the instructions provided there. Once you're done you might notice a warning message - ATTR_FALSE_VALUE. This is intended behavior and you can optionally silence the warning with configureCompat({ ATTR_FALSE_VALUE: false }). When using Vue 3 without the compat layer the warning will go away too.

Migration

Migration from v3

  1. Double-click to move the knob to the current position of the pointer is gone since this is now the default behavior as soon as the clicks on the palette. If you had a tooltip or a help section in your app that described the shortcut you should remove it.

  2. With v4 the keyboard shortcuts are better aligned with the suggested keys for any sliders. This means that the Shift/Ctrl + ↑/→/Shift/Ctrl + ↓/← non-standard key combos are replaced by the simpler PageDown and PageUp. If you had a tooltip or a help section in your app that described the shortcut keys you should update it.

  3. The @change event is now emitted when the user changes the color (knob drop, click on the palette, keyboard interaction, scroll) and a @select event is emitted when interacting with the color well (middle selector).

  <color-picker
      :hue="hue"
      @input="updateHue"
-     @change="onColorSelect"
  />

  <color-picker
      :hue="hue"
      @input="updateHue"
+     @change="onColorChange"
+     @select="onColorSelect"
  />

Contributing

If you're interested in the project you can help out with feature requests, bugfixes, documentation improvements or any other helpful contributions. You can use the issue list of this repo for bug reports and feature requests and as well as for questions and support.

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Credits

This component is based on the great work that was done for the AngularJs color picker.

License

The MIT License (MIT). Please see License File for more information.