1.0.4 • Published 4 months ago

react-heatmaps-grid v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

Heatmap Component

A minimal and customizable heatmap component for React, perfect for visualizing activity data over time.

Installation

npm install react-heatmaps-grid

or

yarn add react-heatmaps-grid

Usage

Import the Heatmap component and pass the required props:

import React from "react";
import Heatmap from "react-heatmaps-grid";

const userActivity = [
  { date: "2025-03-01", count: 2 },
  { date: "2025-03-02", count: 5 },
  { date: "2025-03-03", count: 8 },
  // Add more data points
];

const App = () => {
  return (
    <div>
      <h2>Activity Heatmap</h2>
      <Heatmap userActivity={userActivity} startDate="2025-03-01" endDate="2025-03-31" />
    </div>
  );
};

export default App;

Props

PropTypeDescription
userActivityArrayArray of objects with date (YYYY-MM-DD) and value fields
startDateStringStart date for the heatmap (YYYY-MM-DD)
endDateStringEnd date for the heatmap (YYYY-MM-DD)

Customization

You can customize the component by modifying styles or passing additional props.

License

This project is licensed under the MIT License.

1.0.4

4 months ago

1.0.3

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago