JSPM

  • Created
  • Published
  • Downloads 80834
  • Score
    100M100P100Q176513F
  • License MIT

react drag event interactive

Package Exports

  • @uiw/react-drag-event-interactive

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@uiw/react-drag-event-interactive) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React Drag Event Interactive

npm bundle size npm version Open in unpkg

Interactive Component is a subcomponent of @react-color.

Install

npm i @uiw/react-drag-event-interactive

Usage

import Interactive from '@uiw/react-drag-event-interactive';

function Demo() {
  return (
    <Interactive hsva={{ h: 0, s: 75, v: 82, a: 1 }} />
  );
}

Props

import { Interaction } from '@uiw/react-drag-event-interactive';

interface Interaction {
  left: number;
  top: number;
}

interface InteractiveProps extends React.HTMLAttributes<HTMLDivElement> {
  onMove?: (interaction: Interaction, event: MouseEvent | TouchEvent) => void;
  onDown?: (offset: Interaction, event: MouseEvent | TouchEvent) => void;
}

License

Licensed under the MIT License.