A simple library that provides a component to render user's yearly activity on a calendar.

Overview

activity-calendar-react

activity-calendar-react is a library that provides a component to render user's yearly activity on a calendar. This is similar to what we see in out GitHub profile. The component can be customized with different colors, styles, and features to fit the needs of the application

chrome-capture-2023-1-6

Tech stack: React, Storybook, Rollup(for bundling)

Usage:

install package

npm i activity-calendar-react

Import the component and use it

import React from 'react'
import { ActivityCalendar } from 'activity-calendar-react'

function App() {
  return (
    <div className="App">
      <ActivityCalendar />
    </div>
  );
}

export default App;

Props to pass

Grid color customization

Refer this colorCustomization object for GitHub based design.

colorCustomization is mendatory prop to pass.

const colorCustomization = {
  activity0: '#dadada',
  activity1: '#0e4429',
  activity2: '#006d32',
  activity3: '#26a641',
  activity4: '#39d353',
}

data to render

The data will be in the form of Array objects.

sample data

const sampleData = [
  {
    day: "2023-01-01",
    activity: 5
  },
  {
    day: "2023-01-02",
    activity: 1
  }
]

Month Bar

If you want to render the month bar, use showMonth props. By default it is set to false Screenshot from 2023-02-07 09-20-17

showMonth={true}

Pass it in the component

<ActivityCalendar sampleData={sampleData} colorCustomization={colorCustomization} showMonth={true} />

Contribute:

The package is initialised with the storybook, you can start the story book by running:

npm run storybook
You might also like...
A Simple Calendar App Built Using React.js
A Simple Calendar App Built Using React.js

React Calendar App This is a calendar app, where you can set appointments. Getting started You can view a live demo over at https://calendar-app-appoi

gcal/outlook like calendar component

react-big-calendar An events calendar component built for React and made for modern browsers (read: IE10+) and uses flexbox over the classic tables-ce

react datepicker component.(include persian jalaali calendar)
react datepicker component.(include persian jalaali calendar)

React DatePicker2 A simple and reusable Datepicker component for React (with persian jalali calendar support) Demo. This package uses react-persian-da

gcal/outlook like calendar component

react-big-calendar An events calendar component built for React and made for modern browsers (read: IE10+) and uses flexbox over the classic tables-ce

A no dependencies, lightweight and feature-rich ⚡ calendar component for react.
A no dependencies, lightweight and feature-rich ⚡ calendar component for react.

@natscale/react-calendar A calendar component for react A no dependencies, lightweight and feature-rich ⚡ calendar component for react. 📚 Table of Co

React Calendar component
React Calendar component

React Calendar component

A React component to display a GitHub contributions calendar
A React component to display a GitHub contributions calendar

A React component to display a GitHub contributions calendar

React calendar component
React calendar component

React Calendar Pane React calendar component in ES6 Check out the demo install npm install run tests npm test build the demo npm run demo Usage Ca

React component for calendar widget

React Input Calendar React component for calendar widget. Installation React Input Calendar is available as an npm package. npm install react-input-ca

Releases(v1.0.2)
Owner
Vedant Jain
Core-team member & GSoC'22 @CircuitVerse • GSoD' 22 @PalisadoesFoundation • @MLH-Fellowship Prep Oct'22 • MLSA 2021 • Full-stack Web Developer
Vedant Jain
A React component to display activity data in a calendar (heatmap)

React Activity Calendar A React component to display activity data in a calendar (heatmap). Demo and documentation (Storybook) Development Start the S

Jonathan Gruber 95 Jan 2, 2023
React Calendar Component that displays data from Google Calendar

React Calendar Component that displays data from Google Calendar

Eric Zhou 95 Jan 3, 2023
Club-Event-Calendar-Webpage-Demo - Webpage Demo for Club Event Calendar

Club Event Calendar Webpage Demo Demo Repository for Club Event Calendar Webpage

Hyecheol (Jerry) Jang 1 Jan 9, 2022
Timer for fitness activity

Mino-Timer mino-timer.now.sh Description Timer for fitness activity. Features Exercise name Exercise time Rest time Multiple timers get executed conse

Giacomo Rebonato 0 May 5, 2020
A simple react based calendar component to be used for selecting dates and date ranges

simple-react-calendar A simple calendar component for React based applications. A component that is easy to start using, yet flexible when you need cu

Toptal 111 Dec 30, 2022
A React library to help compose a Date Picker/Calendar around your components

use-date-input This project is a React library to help compose your own date picker and calendar UI components. From simple to advanced, you can build

null 41 Apr 13, 2022
Calendar built in react together with the date-fns library

?? React calendar with date-fns Calendar built in react together with the date-fns library, with the aim of being fully customizable and easy to maint

Nicolas Teófilo 8 Jul 3, 2022
Simple and flexible events calendar written in React

Simple and flexible events calendar written in React

Zach Silveira 120 Jan 1, 2023
Simple date picker and calendar made for React and Day.js

react-dayjs-picker Simple date picker and calendar made for React and Day.js Demo/Documentation Demo and API docs are available here! Install npm inst

Grzegorz Raczek 14 Oct 9, 2022
A simple calendar app.

JC Calendar For the live app click here. This is a simple calendar app where you can add reminders for a specific date/time and city. Development Inst

Augusto Fabian Rodrigues 22 Dec 8, 2022