Docs
Bill Calendar

Bill Calendar

Displays a beautiful Bill Calendar.

October 2024

Current Month

5 Events

SunMonTueWedThuFriSat

Installation

Install the following dependencies:

npm install framer-motion

Copy and paste the cn util code into your project.

import { ClassValue, clsx } from "clsx"
import { twMerge } from "tailwind-merge"
 
 
export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs))
}
 

Copy and paste the Bill Calendar code into your project.

API Reference

PropTypeDescription
currentDateDateThe currently displayed month.
selectedDateDate | undefinedThe selected date.
showChartbooleanControls the visibility of the chart.
eventsRecord<string, Event>The list of events by date.
chartConfigChartConfigConfiguration for chart display.
chartDataArray<object>Data used in the chart.
maxEventsnumberMaximum events displayed per day.
classNamestringCustom class names for styling.
handlePreviousMonth() => voidHandles the previous month action.
handleNextMonth() => voidHandles the next month action.
renderDayContent(day: Date) => JSX.Element | nullCustom rendering for each day.
show() => voidTriggers a toast notification.
totalVisitorsnumberTotal visitors calculated from chart data.
getEventIcons(day: Date) => JSX.Element | nullRetrieves icons for events.