### Basic Calendar Heatmap Example Source: https://context7_llms Demonstrates a basic calendar heatmap with a GitHub-style contribution graph. It uses `variantClassnames` for styling and `datesPerVariant` to assign dates to specific intensity levels. ```tsx import { CalendarHeatmap } from "@/components/ui/calendar-heatmap" ``` -------------------------------- ### Rainbow Variant Calendar Heatmap Source: https://context7_llms An example demonstrating a multi-color (rainbow) variant for the calendar heatmap. It defines an array of color classes and uses it with `variantClassnames`. ```typescript const Rainbow = [ "text-white hover:text-white bg-violet-400 hover:bg-violet-400", "text-white hover:text-white bg-indigo-400 hover:bg-indigo-400", "text-white hover:text-white bg-blue-400 hover:bg-blue-400", "text-white hover:text-white bg-green-400 hover:bg-green-400", "text-white hover:text-white bg-yellow-400 hover:bg-yellow-400", "text-white hover:text-white bg-orange-400 hover:bg-orange-400", "text-white hover:text-white bg-red-400 hover:bg-red-400", ] ``` ```tsx ``` -------------------------------- ### Multi-Month Calendar Heatmap Source: https://context7_llms Shows how to configure the heatmap to display multiple months by setting the `numberOfMonths` prop. This example also uses `datesPerVariant` for date distribution. ```tsx ``` -------------------------------- ### Calendar Heatmap with Weighted Dates Source: https://context7_llms Illustrates using the `weightedDates` prop for automatic date categorization based on assigned weights. This is useful for data where each date has an associated numerical value. ```tsx ``` -------------------------------- ### Using DayPicker Props - React (tsx) Source: https://context7_llms Extend the functionality of the CalendarHeatmap component by utilizing any of the available DayPicker props. This includes setting date ranges with `fromDate` and `toDate`, disabling specific dates using the `disabled` prop, and handling user interactions like day clicks with `onDayClick`. These props enable dynamic behavior and user interaction customization. ```tsx console.log(day)} /> ``` -------------------------------- ### WeightedDateEntry Type Definition Source: https://context7_llms Defines the structure for date entries when using weighted dates. Each entry includes a Date object and a numerical weight to determine its intensity level in the heatmap. ```typescript type WeightedDateEntry = { date: Date weight: number } ``` -------------------------------- ### Custom Styling with classNames - React (tsx) Source: https://context7_llms Override default calendar styles by providing custom Tailwind CSS classes to the `classNames` prop. This allows for granular control over the appearance of months, captions, and other calendar elements. Ensure the provided classes are compatible with the target CSS framework (e.g., Tailwind CSS). ```tsx ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.