
Research
/Security News
11 Malicious Go Packages Distribute Obfuscated Remote Payloads
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
react-heatmap
Advanced tools
A very simple port of heatmap.js
for React
. The idea behind this component is to be able to display a heatmap over any type of content (image, div, components ...). By default, the heatmap will always take all available width and height of its container.
Live demo: JonathanWi.github.io/react-heatmap
To build the examples locally, run:
npm install
npm start
Then open localhost:8000
in a browser.
The easiest way to use react-heatmap is to install it from NPM and include it in your own React build process (using Browserify, Webpack, etc).
You can also use the standalone build by including dist/react-heatmap.js
in your page. If you use this, make sure you have already included React, and it is available as a global variable.
npm install react-heatmap --save
This component is pretty straightforward and only expecting 2 simple parameters (max
and data
; if you're unfamiliar with these, take a look at the heatmap.js documentation
);
var ReactHeatmap = require('react-heatmap');
let data = [{ x: 10, y: 15, value: 5}, { x: 50, y: 50, value: 2}, ...];
<ReactHeatmap max={5} data={data} />
General component description.
Prop | Type | Default | Required | Description |
---|---|---|---|---|
max | int | 5 | No | Maximum value for intensity |
data | array | [] | No | Heatmap array of dots |
unit | string | percent | No | Can be either percent or pixels . If percent, a x value like 26 is considered 26% of the container from the top left |
src
, lib
and the build process)NOTE: The source code for the component is in src
. A transpiled CommonJS version (generated with Babel) is available in lib
for use with node.js, browserify and webpack. A UMD bundle is also built to dist
, which can be included without the need for any build system.
To build, watch and serve the examples (which will also watch the component source), run npm start
. If you just want to watch changes to src
and rebuild lib
, run npm run watch
(this is useful if you are working with npm link
).
MIT License Copyright (c) 2016 Jonathan Widawski.
FAQs
React Heatmap
The npm package react-heatmap receives a total of 50 weekly downloads. As such, react-heatmap popularity was classified as not popular.
We found that react-heatmap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).