The most compressed genuinely-useful form of each calendar surface — for dashboard cells, sidebars, and anywhere a full view has no room (~200×150px and up).
Below panel size the ENCODING has to change, not just the type scale, so these are dedicated components rather than shrunken grids:
next_events/1— the viewer's next N events as a compact list. The single highest-value calendar widget.week_strip/1— seven day cells with event dots/counts; replaces an illegible miniature time grid.activity_grid/1— the GitHub-style contributions strip (weeks × weekdays) overHeatmapdata.activity_month/1— the same square encoding for ONE month, in calendar orientation (weekday columns, week rows).mini_timeline/1— a preset-compressedTimeline(fitted window, no labels, tiny slots) for a peek at today's sessions.
For a compact MONTH, use PhoenixLiveCalendar.Components.MiniCalendar
(optionally with heatmap markers_by_date) — it already is the widget
form.
Summary
Functions
A GitHub-contributions strip: weeks columns × 7 weekday rows of tiny
intensity squares over Heatmap data (Date => number).
One month of activity squares in calendar orientation — the
activity_grid/1 encoding at month scale: weekday columns, one row per
week, out-of-month days blank, today ringed.
A preset-compressed Timeline: fitted window, no time axis, no bar
labels (tooltips remain), tiny slots, at most max_rows resources.
The next limit events, soonest first, as a compact list.
Seven day cells — narrow day letter, day number, up to three event dots;
busier days collapse to a +N TOTAL count. The week-at-a-glance
replacement for a time grid that would be illegible at widget size.
Functions
A GitHub-contributions strip: weeks columns × 7 weekday rows of tiny
intensity squares over Heatmap data (Date => number).
data— the per-day numbers;palette/scale/maxbehave as inPhoenixLiveCalendar.Heatmap.markers/2to— last day shown (default: today); the strip covers theweeks * 7days ending there, aligned toweek_start- Each active square carries a
titletooltip with the date and value.
Attributes
data(:any) (required)to(Date) - Defaults tonil.weeks(:integer) - Defaults to26.week_start(:integer) - Defaults to1.palette(:any) - Defaults to:success.scale(:atom) - Defaults to:linear.max(:any) - Defaults tonil.cell_class(:string) - Defaults to"w-1.5 h-1.5 rounded-[2px]".translations(:map) - Defaults to%{}.class(:string) - Defaults to"".
One month of activity squares in calendar orientation — the
activity_grid/1 encoding at month scale: weekday columns, one row per
week, out-of-month days blank, today ringed.
data— per-day numbers;palette/scale/maxas inPhoenixLiveCalendar.Heatmap.markers/2date— any date inside the month (default: today)show_day_initials— narrow weekday initials above the columns (defaulttrue)
Attributes
data(:any) (required)date(Date) - Defaults tonil.today(:any) - Date | nil (server today) | :none (no today highlight). Defaults tonil.week_start(:integer) - Defaults to1.palette(:any) - Defaults to:success.scale(:atom) - Defaults to:linear.max(:any) - Defaults tonil.cell_class(:string) - Defaults to"w-3 h-3 rounded-[3px]".show_day_initials(:boolean) - Defaults totrue.translations(:map) - Defaults to%{}.class(:string) - Defaults to"".
A preset-compressed Timeline: fitted window, no time axis, no bar
labels (tooltips remain), tiny slots, at most max_rows resources.
Attributes
id(:string) - Defaults to"mini-timeline".date(Date) (required)resources(:list) (required)events(:list) - Defaults to[].max_rows(:integer) - Defaults to3.resource_width(:string) - Defaults to"6rem".today(:any) - Date | nil (server today) | :none (no today highlight). Defaults tonil.now(Time) - Defaults tonil.on_event_click(:any) - Defaults tonil.class(:string) - Defaults to"".
The next limit events, soonest first, as a compact list.
events— the pool to pick from (pass whatever you have; ended events are dropped: timed ones by comparingeffective_endtonow, all-day ones once their last date is past)now— the reference instant (defaultDateTime.utc_now()); pass the viewer's local time for timezone-correct "Today" groupingwithin_days— horizon (default 14)- Each row: color dot (the event's resolved color), truncated title, and a short when-label — the time for today's events, the weekday within a week, the date beyond that.
Attributes
events(:list) (required)now(DateTime) - Defaults tonil.limit(:integer) - Defaults to3.within_days(:integer) - Defaults to14.on_event_click(:any) - Defaults tonil.time_format(:atom) - Defaults to:h24.translations(:map) - Defaults to%{}.class(:string) - Defaults to"".
Seven day cells — narrow day letter, day number, up to three event dots;
busier days collapse to a +N TOTAL count. The week-at-a-glance
replacement for a time grid that would be illegible at widget size.
Attributes
date(Date) - any date inside the week (default: today). Defaults tonil.events(:list) - Defaults to[].today(:any) - Date | nil (server today) | :none (no today highlight). Defaults tonil.week_start(:integer) - Defaults to1.on_date_click(:any) - Defaults tonil.translations(:map) - Defaults to%{}.class(:string) - Defaults to"".