Nanoprogrammed Penultimate Musicianship

    @uiw/react-color-hue
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.12 • Public • Published

    React Color Hue

    npm bundle size npm version Open in unpkg

    Hue Component is a subcomponent of @react-color.

    react-color-hue

    Install

    npm i @uiw/react-color-hue

    Usage

    import Hue from '@uiw/react-color-hue';
    
    function Demo() {
      const [hsva, setHsva] = useState({ h: 0, s: 0, v: 68, a: 1 });
      return (
        <Hue
          hue={hsva.h}
          onChange={(newHue) => {
            setHsva({ ...hsva, ...newHue });
          }}
        />
      );
    }

    Props

    import React from 'react';
    import { AlphaProps } from '@uiw/react-color-alpha';
    export interface HueProps extends Omit<AlphaProps, 'hsva' | 'onChange'> {
      onChange?: (newHue: { h: number; }) => void;
      hue: number;
    }

    License

    Licensed under the MIT License.

    Install

    npm i @uiw/react-color-hue

    DownloadsWeekly Downloads

    2,519

    Version

    1.0.12

    License

    MIT

    Unpacked Size

    12.3 kB

    Total Files

    9

    Last publish

    Collaborators

    • wcjiang