Calendar Mosaic
A free logos and stats calendar mosaic for date-positioned monthly values and unknown days in React.
Daily activity — February 2024
| Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday |
|---|---|---|---|---|---|---|
| 0 tasks | 4 tasks | Unknown | Unknown | |||
| Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown |
| Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown |
| Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown |
| Unknown | Unknown | Unknown | 2 tasks |
- : 0 tasks
- : 4 tasks
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : Unknown
- : 2 tasks
Customise
Code
const observations = [
{ date: "2024-02-01", value: 0 },
{ date: "2024-02-02", value: 4 },
{ date: "2024-02-29", value: null },
];
<StatCalendarMosaic
year={2024}
month={2}
title="Daily activity"
observations={observations}
unit=" tasks"
/>Calendar Mosaic places observations on their Gregorian dates and includes a complete textual list for review. Zero remains an observed value, while null and absent dates are labelled unknown.
It validates month bounds, ISO dates, duplicate observations and finite non-negative values. Invalid input is reported instead of being coerced into a plausible calendar.
Install
Add the @te registry to your components.json once:
{
"registries": {
"@te": "https://templateempire.io/r/{name}.json"
}
}Then install the component:
npx shadcn@latest add @te/stat-calendar-mosaicUsage
import { StatCalendarMosaic } from "@/components/stat-calendar-mosaic";
const observations = [{ date: "2024-02-01", value: 0 }, { date: "2024-02-02", value: 4 }, { date: "2024-02-29", value: null }];
export function MonthlyActivity() {
return <StatCalendarMosaic year={2024} month={2} title="Daily activity" observations={observations} unit=" tasks" />;
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
| year | number | required | Gregorian year from 1 to 9999. |
| month | number | required | Gregorian month from 1 (January) to 12 (December). |
| title | string | required | Accessible name and visible heading. |
| observations | CalendarObservation[] | required | Strict ISO date observations with finite non-negative values; null means explicitly unknown. |
| unit | string | "" | Text appended to recorded values. |
| className | string | undefined | Additional classes merged with the calendar section. |
Customisation
The calendar uses semantic surface, text and border tokens. Pass the reporting period and observations directly; include null when a date is known to be unknown:
<StatCalendarMosaic year={2024} month={2} title="Daily activity" observations={observations} unit=" tasks" />Frequently asked questions
- Is Calendar Mosaic free for commercial use?
- Yes. The component is MIT licensed and may be used in personal and commercial projects.
- How is zero different from a missing value?
- Zero is rendered as a recorded zero. Null and dates without an observation are labelled unknown.
- Does it support leap years?
- Yes. Calendar positions follow Gregorian month lengths, including February 29 in leap years.