1.0.1 • Published 6 months ago

simple-react-heatcalendar v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

NPM Version NPM Downloads npm bundle size

Simple React HeatCalendar

This package provides a simple and customizable calendar component for React applications. It allows you to customize color throughout the component and pass values to fill color on select dates. Most heat maps display the full year. This allows you to display a month at a time. It also is responsive for mobile.

Benefits

  • Functional Calendar that allows you to move by year and months
  • Day of the week are accurate
  • Pass the value prop to change color of specific dates
  • Change color of everything on the calendar with props

Examples of the component

Installation

npm install simple-react-heatCalendar

import the component after install

import {Calendar} from 'simple-react-heatcalendar'

const value = [
    {
      day: "2024-12-31",
    },
    {
      day: "2024-12-30",
    },
    {
      day: "2024-12-28",
    },
  ];
<Calendar 
    topLabelColor={'green'}
    fontLabelColor={"yellow"}
    borderColor={'green'}
    borderWidth={.25}
    buttonSize={32}
    calendarGap={4}
    calendarPadding={20}
    roundedCalendar={12}
    labelBackground={'black'} 
    calendarBackground={'black'}
    calendarDayColor={'blue'}
    calendarBorder={true}
    removeLabelDays={false}
    removeDates={false}
    selectedColor={'red'} 
    value={value}
    dateColor={'purple'}
/>

Props that can be passed to the component

PropDescriptionExampleMisc
fontLabelColorThe color of the days of the week above the calendaryellow or #333required to wrapped in a string
topLabelColorthe font color on the top, the forward and reverse button and year and month fontyellow or #333required to wrapped in a string
selectedColorThe fill color of the dates that are selected and passed in the value variable#333required to wrapped in a string
valuethe value passed here fills in the corresponding date filled in{value:1, day: "2024-12-31"},{value:1, day:"2024-12-30}value current doesn't have a purpose but will be built in future updates. label day is required and the day string is required in example format
dateColorthe color of the date label#333required to wrapped in a string
calendarGapthe gap between each cell in the calendar1
roundedCalendarrounds the corners of each date cell12
calendarPaddingaddins padding to full calendar4
calendarBorderboolean if you want a bordertrue or falseboolean
borderWidththe width of the border2requires calendarBorder to be true
borderColorcolor of the bordergreenrequired to wrap in a string
buttonSizesize of the forward/reverse buttons32
labelBackgroundthe background color of the day labelsgreenrequired to wrap in a string
calendarBackgroundBackground behind each day cell, the color of this is passed to the fill color if calendarDayColor is not setbluerequired to wrap in a string
calendarDayColorsets color of each day cellbluerequired to wrap in a string
removeLabelDaysif false it removes the label days above the calendartrue or falseboolean
removeDatesremoves the number in each calendar celltrue or falseboolean
1.0.1

6 months ago

1.0.0

6 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago