npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@symbiot.dev/react-native-heatmap

v1.0.0

Published

A lightweight and customizable activity graph for React Native, perfect for visualizing user engagement, habits, streaks, or productivity over time.

Readme

react-native-heatmap is a lightweight and customizable activity graph for React Native. Perfect for visualizing user engagement, habits, streaks, or productivity over time. It supports iOS, Android, Web, and Expo, making it easy to drop into any cross-platform app.


📱 Demo


✨ Key Features

🔥 Activity Grid – Clean, familiar visual language
🎨 Themeable & Flexible – Customize color levels, spacing & more
📆 Date-Aware – Renders accurate calendar heatmaps over weeks/months
📱 Cross-Platform – Fully supports:

  • iOS & Android
  • Web via React Native Web
  • Expo & Expo Go

💡 Use Cases

  • Habit tracking
  • Productivity dashboards
  • Wellness streaks
  • Learning progress (e.g. courses, coding)
  • Daily user activity insights

👩🏿‍💻 Installation

npm install @symbiot.dev/react-native-heatmap date-fns react-native-svg
# or
yarn add @symbiot.dev/react-native-heatmap date-fns react-native-svg

# for web support
npm i react-native-web
# or
yarn add react-native-web

🧩 Components

The package provides two main heatmap components out of the box:

  • MonthlyHeatMap — Displays activity heatmaps aggregated by month.
  • WeeklyHeatMap — Displays activity heatmaps aggregated by week.

📅 HeatMapDailyPropsDaily Data Configuration

Provide daily activity data for the heatmap. Accepts either an array of dates or a record mapping dates to activity counts.

| Property | Type | Description | 🌐 Web | 🍏 iOS | 🤖 Android | |----------|------------------------------------------------|-----------------------------------------------------------|:------:|:------:|:----------:| | data | (Date \| string)[] \| Record<string, number> | Array of dates or object with date keys and count values. | ✅ | ✅ | ✅ |


📆 HeatMapWeeklyPropsWeekly Data Configuration

Customize weekly layout and cell content display. Set which day the week starts on and choose to show date or count inside cells.

| Property | Type | Description | 🌐 Web | 🍏 iOS | 🤖 Android | |----------------|---------------------|---------------------------------------------------------|:------:|:------:|:----------:| | weekStartsOn | Day | Day to start the week (e.g. Sunday or Monday). | ✅ | ✅ | ✅ | | cellText | 'date' \| 'count' | Content shown inside cells: the date or activity count. | ✅ | ✅ | ✅ |


The components is fully customizable, offering a flexible theming system to align with your app’s look and feel. You can fine-tune the color palette, layout behavior, and styling for both light and dark modes.

🔥 HeatMapSchemeColor Scheme Configuration

type HeatMapScheme = 'light' | 'dark';

Defines the visual scheme used by the heatmap. Useful when supporting multiple themes.

  • light – Light mode colors
  • dark – Dark mode colors
type HeatMapColor = {
  headerTextColor?: string;
  cellDefaultColor?: string;
  cellTextColor?: string;
  cellColor?: Record<number, string>;
  sidebarTextColor?: string;
};

Defines the color palette for different parts of the heatmap UI.

| Property | Type | Description | Web | iOS | Android | |--------------------|--------------------------|---------------------------------------------------------------------|:---:|:---:|:-------:| | headerTextColor | string | Color of the top header labels (e.g. days of the week). | ✅ | ✅ | ✅ | | cellDefaultColor | string | Background color used when no activity level is defined. | ✅ | ✅ | ✅ | | cellTextColor | string | Text color inside individual cells (if used). | ✅ | ✅ | ✅ | | cellColor | Record<number, string> | Maps activity levels (e.g. 1–5) to specific cell background colors. | ✅ | ✅ | ✅ | | sidebarTextColor | string | Color for sidebar text (e.g. month or week labels). | ✅ | ✅ | ✅ |

🎨 HeatMapThemePropsTheme & Colors

Supports global styling with per-scheme overrides (light/dark). The scheme property determines the active theme. You can define a base theme and override specific properties for each mode.

type HeatMapThemeProps = HeatMapColor & {
  scheme?: HeatMapScheme;
} & {
  [key in HeatMapScheme]?: HeatMapColor;
};

🎨 HeatMapStyleStyle Customization

type HeatMapStyle = {
  scrollStyle?: StyleProp<ViewStyle>;
  headerTextAlign?: TextStyle['textAlign'];
};

Defines optional style overrides for layout and header alignment in the heatmap component. Use this type to customize the scroll container and control how the header text is aligned.

| Property | Type | Description | Web | iOS | Android | |-------------------|--------------------------|--------------------------------------------------------------------|:---:|:---:|:-------:| | scrollStyle | StyleProp<ViewStyle> | Style for the scrollable container that wraps the heatmap grid. | ✅ | ✅ | ✅ | | headerTextAlign | TextStyle['textAlign'] | Controls alignment of the header text (left, center, right). | ✅ | ✅ | ✅ |


📐 HeatMapDimensionsPropsDimensions & Sizing

Customize sizing and spacing to perfectly fit your design and layout needs. Adjust fonts, cell size, gaps, and radius for a tailored heatmap appearance.

| Property | Type | Description | 🌐 Web | 🍏 iOS | 🤖 Android | |-----------------------|----------|---------------------------------------------------------|:------:|:------:|:----------:| | headerTextFontSize | number | Font size for the header text (e.g. days of week). | ✅ | ✅ | ✅ | | headerBottomSpace | number | Space below the header area. | ✅ | ✅ | ✅ | | cellSize | number | Width and height of each heatmap cell. | ✅ | ✅ | ✅ | | cellRadius | number | Border radius of each heatmap cell for rounded corners. | ✅ | ✅ | ✅ | | cellGap | number | Gap between individual cells. | ✅ | ✅ | ✅ | | cellTextFontSize | number | Font size of the text inside each cell (if any). | ✅ | ✅ | ✅ | | sideBarTextFontSize | number | Font size for the sidebar text (e.g. month labels). | ✅ | ✅ | ✅ |


🎛️ HeatMapControllerPropsController & Interaction

Control interaction and visibility options for the heatmap component. Toggle press, hover, scrolling behaviors, layout direction, and UI element visibility.

| Property | Type | Description | 🌐 Web | 🍏 iOS | 🤖 Android | |---------------------|-----------|----------------------------------------------------------|:------:|:------:|:----------:| | pressable | boolean | Enables pressing (tap) on heatmap cells. | ✅ | ✅ | ✅ | | hoverable | boolean | Enables hover effect on cells (primarily for web). | ✅ | ❌ | ❌ | | scrollable | boolean | Enables scrolling of the heatmap container. | ✅ | ✅ | ✅ | | rtl | boolean | Enables right-to-left layout support for RTL languages. | ✅ | ✅ | ✅ | | isHeaderVisible | boolean | Toggles visibility of the header row (e.g. days labels). | ✅ | ✅ | ✅ | | isCellTextVisible | boolean | Toggles visibility of text inside cells. | ✅ | ✅ | ✅ | | isSidebarVisible | boolean | Toggles visibility of the sidebar (e.g. month labels). | ✅ | ✅ | ✅ |


📝 HeatMapFormatterPropsText Formatting & Localization

Customize text formatting and localization for headers and sidebars. Format date labels and apply locale-specific formatting for better internationalization.

| Property | Type | Description | 🌐 Web | 🍏 iOS | 🤖 Android | |---------------------|----------|--------------------------------------------------------|:------:|:------:|:----------:| | headerTextFormat | string | Format string for header text (e.g. days of the week). | ✅ | ✅ | ✅ | | sidebarTextFormat | string | Format string for sidebar text (e.g. month labels). | ✅ | ✅ | ✅ | | locale | Locale | Locale object for date localization (from date-fns). | ✅ | ✅ | ✅ |


HeatMapDatetimePropsDate & Time Configuration

Configure the date range and visibility of specific days in the heatmap. Control which days are displayed and the start/end boundaries of the activity grid.

| Property | Type | Description | 🌐 Web | 🍏 iOS | 🤖 Android | |--------------|---------|--------------------------------------------|:------:|:------:|:----------:| | startDate | Date | The starting date for the heatmap display. | ✅ | ✅ | ✅ | | endDate | Date | The ending date for the heatmap display. | ✅ | ✅ | ✅ | | hiddenDays | Day[] | Array of days to hide (e.g., weekends). | ✅ | ✅ | ✅ |


🎯 HeatMapActionsPropsUser Actions & Events

Handle user interactions with the heatmap cells, including taps and mouse events. Useful for adding custom behaviors like tooltips, navigation, or analytics tracking.

| Property | Type | Description | 🌐 Web | 🍏 iOS | 🤖 Android | |----------------|-------------------------------------------------------------------------|-----------------------------------------------------|:------:|:------:|:----------:| | onCellPress | (params: { date: Date; count: number }) => void | Callback fired when a cell is pressed/tapped. | ✅ | ✅ | ✅ | | onMouseEnter | (params: { date: Date; x: number; y: number; count: number }) => void | Callback fired when mouse enters a cell (web only). | ✅ | ❌ | ❌ | | onMouseLeave | () => void | Callback fired when mouse leaves a cell (web only). | ✅ | ❌ | ❌ |


🌐 Platform Support

  • ✅ iOS
  • ✅ Android
  • ✅ Web
  • ✅ Expo & Expo Go

📦 Bundle Size

Lightweight and fast — see actual size on Bundlephobia.


💬 Contributing

Contributions welcome! Feel free to open issues, discussions, or suggestions.


🌟 Who's Using This?

Using react-native-heatmap in your app or product?
Feel free to share your project — it might be featured in this section!

✉️ Open pull request, or reach out directly to get included.


🚀 Got Ideas or Gaps to Fill?

Know of existing libraries or functionality that could be improved?
Have an idea for something completely new?

Symbiot is ready to take on the challenge — feedback, feature requests, or collaboration ideas are always welcome!

🧠 Let’s build better tools together. Start the conversation or contact via email.


🧾 License

MIT — Made with ❤️ by Symbiot