Gathering detailed insights and metrics for @uiw/react-drag-event-interactive
Gathering detailed insights and metrics for @uiw/react-drag-event-interactive
Gathering detailed insights and metrics for @uiw/react-drag-event-interactive
Gathering detailed insights and metrics for @uiw/react-drag-event-interactive
🎨 Is a tiny color picker widget component for React apps.
npm install @uiw/react-drag-event-interactive
Typescript
Module System
Node Version
NPM Version
93.8
Supply Chain
89.6
Quality
94.2
Maintenance
100
Vulnerability
100
License
TypeScript (98.31%)
HTML (1%)
CSS (0.64%)
Less (0.04%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
422 Stars
497 Commits
118 Forks
4 Watchers
9 Branches
19 Contributors
Updated on Jul 14, 2025
Latest Version
2.7.1
Package Id
@uiw/react-drag-event-interactive@2.7.1
Unpacked Size
23.21 kB
Size
4.95 kB
File Count
12
NPM Version
10.8.2
Node Version
20.19.3
Published on
Jul 11, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
1
Interactive Component is a subcomponent of @react-color
.
1npm i @uiw/react-drag-event-interactive
1import React, { useState } from 'react'; 2import Interactive from '@uiw/react-drag-event-interactive'; 3 4const pointStyle = { width: 5, height: 5, backgroundColor: '#fff', position: 'absolute', borderRadius: 3, border: '1px solid rgb(51, 51, 51)' } 5const wrapper = { width: 120, height: 120, background: 'red', position: 'relative' } 6 7function Demo() { 8 const [data, setData] = useState({ 9 left: 0.10, 10 top: 0.10, 11 }) 12 const handleChange = (interaction, event) => setData(interaction); 13 const point = { left: `${data.left * 100}%`, top: `${data.top * 100}%`, ...pointStyle } 14 return ( 15 <div> 16 <Interactive 17 style={wrapper} 18 onMove={handleChange} 19 onDown={handleChange} 20 > 21 <div style={point} /> 22 </Interactive> 23 <pre> 24 {JSON.stringify(data, null, 2)} 25 </pre> 26 </div> 27 ); 28} 29 30export default Demo;
1import React from 'react'; 2export declare function useEventCallback<T, K>(handler?: (value: T, event: K) => void): (value: T, event: K) => void; 3export declare const isTouch: (event: MouseEvent | TouchEvent) => event is TouchEvent; 4export declare const preventDefaultMove: (event: MouseEvent | TouchEvent) => void; 5export declare const clamp: (number: number, min?: number, max?: number) => number; 6export interface Interaction { 7 left: number; 8 top: number; 9 width: number; 10 height: number; 11 x: number; 12 y: number; 13} 14export declare const getRelativePosition: (node: HTMLDivElement, event: MouseEvent | TouchEvent) => Interaction; 15export interface InteractiveProps extends React.HTMLAttributes<HTMLDivElement> { 16 prefixCls?: string; 17 onMove?: (interaction: Interaction, event: MouseEvent | TouchEvent) => void; 18 onDown?: (offset: Interaction, event: MouseEvent | TouchEvent) => void; 19}
As always, thanks to our amazing contributors!
Made with contributors.
Licensed under the MIT License.
No vulnerabilities found.
Reason
22 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
Found 5/30 approved changesets -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More