Name Picker Malfunction

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

    1.0.12 • Public • Published

    React Color Slider

    npm bundle size npm version Open in unpkg

    Slider Component is a subcomponent of @react-color.

    react-color-slider

    Install

    npm i @uiw/react-color-slider

    Usage

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

    Props

    import React from 'react';
    import { ColorResult, HsvaColor } from '@uiw/color-convert';
    export interface SliderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'color'> {
      prefixCls?: string;
      color?: string | HsvaColor;
      lightness?: number[];
      onChange?: (color: ColorResult, evn: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
    }

    License

    Licensed under the MIT License.

    Install

    npm i @uiw/react-color-slider

    DownloadsWeekly Downloads

    636

    Version

    1.0.12

    License

    MIT

    Unpacked Size

    19.4 kB

    Total Files

    9

    Last publish

    Collaborators

    • wcjiang