Skip to content
Back

Activity heat mapPro

A year of activity as week columns in five levels, with a day tooltip, year navigation and a compact strip for overview cards.

oxyn add activity-heatmap
Threadbear activity
79 threads started in 2026
2026
JanFebMarAprMayJunJulAugSepOctNovDecMonWedFri
Threads in a private folder aren't counted
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • A year of activity as week columns, Sunday rows first (heat_year, with jan1_weekday and month_cols for the labels).
  • Five levels split at the quartiles of the non-zero days (heat_levels), so one busy day never washes the year out.
  • Hovering a day, or arrowing through the grid, shows a tooltip (heat_tip: "5 chats · Mon, Oct 5").
  • With more than one year the header steps with ‹ › and the total rolls; the cells fade in column by column. weeks gives the compact strip of the last weeks used in overview cards.

When not to use

  • A launch countdown with digits that roll per unit, a compact one-line variant, hours absorbing days when days are hidden, and a live state with a pulsing dot at zero: use Countdown instead.
  • A total that moves clearly: use Animated counter instead.
  • A collapsible JSON tree with search, paging for long arrays, copy value or path, the current path under the tree and full keyboard moves: use JSON viewer instead.

Installation

Activity heat map is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add activity-heatmap

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Year

A year with ‹ › navigation and a day tooltip.

Threadbear activity
79 threads started in 2026
2026
JanFebMarAprMayJunJulAugSepOctNovDecMonWedFri
Threads in a private folder aren't counted
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Compact

The last 24 weeks for an overview card.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

ActivityHeatmap

PropTypeDefaultDescription
yearsrequiredVec<(i32, Vec<u32>)>—`(year, counts per day of the year)`, oldest first.
titleStringDefault::default()Card title ("Threadbear activity").
nounString"chat"Singular noun for counts ("thread").
verbString"started"Verb after the total ("started").
footnoteOption<String>Default::default()Footnote under the grid.
weeksOption<u32>Default::default()Compact strip of the last `weeks` weeks (no labels, no year nav).
cellf3211.0Cell size in px.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
←or→A week back / forward
↑or↓A day back / forward
HomeorEndFirst / last day
EscHide the tooltip

Accessibility

  • The grid is one focusable element with a summary label; the tooltip is role=status so arrowing reads each day.
  • Levels step in lightness and the legend reads Less → More.
  • Reduced motion drops the cell fade.
From the spec
  • The grid is one focusable element with a summary label; the tooltip is role=status.
  • Year buttons are labelled and disabled at the ends.

Motion & interaction

Timing
  • Cell fade 350 ms, delayed 9 ms a column.
  • Tooltip fades in over 120 ms.
  • Reduced motion: no fade or roll.

Responsive behaviour

  • Scrolls sideways inside its card below the year's width.
Edge cases (spec)
  • Scrolls sideways in its card below the year's width; the compact strip scales to the card.

Notes for AI

  • Import ActivityHeatmap from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: ActivityHeatmapEl in oxyn_gpui.
  • Props to set first: years.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI