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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vuelor/gradient

v0.2.0

Published

Composable Vue gradient editor — CSS gradient parsing, a useGradient composable and headless GradientPicker components built with Reka UI and Tailwind CSS on top of @vuelor/picker.

Readme

Installation

pnpm add @vuelor/gradient @vuelor/picker

Compose an editor

<script setup>
import { ref } from 'vue'
import {
  GradientPickerRoot,
  GradientPickerSlider,
  GradientPickerAngleInput,
  GradientPickerAddStop,
  GradientPickerRemoveStop,
  GradientPickerReverse,
  GradientPickerRotate
} from '@vuelor/gradient'
import { ColorPickerRoot, ColorPickerCanvas, ColorPickerSliderHue, ColorPickerSliderAlpha, ColorPickerInputHex } from '@vuelor/picker'

const value = ref('linear-gradient(90deg, #FF98C2FF 0%, #FFFA7AFF 100%)')
</script>

<template>
  <GradientPickerRoot v-model="value" v-slot="{ gradient }">
    <div class="flex items-center justify-between">
      <GradientPickerAngleInput />
      <div class="flex items-center gap-1">
        <GradientPickerReverse />
        <GradientPickerRotate />
        <GradientPickerAddStop />
        <GradientPickerRemoveStop />
      </div>
    </div>

    <div class="pt-4">
      <GradientPickerSlider />
    </div>

    <ColorPickerRoot v-model="gradient.selectedColor.value" class="shadow-none p-0 w-auto">
      <ColorPickerCanvas />
      <ColorPickerSliderHue />
      <ColorPickerSliderAlpha />
      <ColorPickerInputHex />
    </ColorPickerRoot>
  </GradientPickerRoot>
</template>

v-model is a CSS gradient string. Supported grammar (what the serializer emits, so values round-trip):

  • linear-gradient(<angle>deg, <stops>)
  • radial-gradient(circle at center, <stops>)
  • conic-gradient(from <angle>deg, <stops>)

with stops as #hex [position%] (3/4/6/8-digit hex, missing positions interpolated like CSS).

Use the parts without components

import { parseGradient, serializeGradient, useGradient } from '@vuelor/gradient'

const parsed = parseGradient('linear-gradient(90deg, #FF98C2 0%, #FFFA7A 100%)')
// { type: 'linear', angle: 90, stops: [{ color: '#FF98C2FF', position: 0 }, …] }

const gradient = useGradient({ stops: parsed.stops })
gradient.addStop()          // splits the selected segment at its midpoint
gradient.css.value          // 'linear-gradient(90deg, …)'

Styling

The components use the same theming system as @vuelor/picker — Tailwind classes by default, styling="vanillacss" with import '@vuelor/gradient/style.css' for non-Tailwind projects, or styling="unstyled" for a blank slate. Tailwind v4 users must add @import "@vuelor/gradient/tailwind.css"; to their global CSS (alongside the same line for the picker) so Tailwind scans the package, plus the --drop-shadow-vuelor-thumb token documented at vuelor.dev. On versions before 0.2.0 the entry point does not exist yet — use @source "../../node_modules/@vuelor/gradient"; instead, relative to your CSS file.