shadcn.io is not affiliated with official shadcn/ui
Hourly Event Strip Stats Integration Block for React
An integration stats section for an onboarding-checklist tool connected to PostHog: a strip of 24 hour cells shaded on a foreground ramp, a readout for the hour you point at or focus, and three figures worked out from the typed counts.
Installation
Overview
An integration stats section for React with Base UI, written for Cairnstep, a fictional tool that builds onboarding checklists whose steps tick off when a PostHog event arrives, and the events it read in one example day. A start-aligned header carries the title and a headline counted from the data ("46,330 events read, 4,820 in the busiest hour"), and at its end the mark pair (Cairnstep's own tile and PostHog's neutral lettermark tile). Under a band rule, a strip of 24 hour cells shares hairlines, 24 across from lg and two rows of 12 on a phone, each shaded on a ramp of five solid foreground steps with no hue, with a legend. A readout line above it says the hour you hover, tap or focus ("14:00, 4,820 events"), starting on the busiest hour. A closing band of three figures is worked out from the typed counts: events read, the share not mapped to a step, and the busiest hour. The page's rails and top rule come from the Guides spine, so it lines up with its neighbours in a stack. It's built from Guides, with CSS transitions and your theme's tokens for every colour. PostHog is named in text only: no PostHog logo, colour or wordmark ships with the block. The counts are example data; nothing is read from PostHog.
FAQ
How are the figures worked out?
HOURS holds the 24 counts and UNMAPPED the events no checklist step is mapped to. The total, the busiest hour and its count, the headline and the unmapped share (one decimal) are all computed from those two, so changing a count changes every figure that depends on it. Nothing is read from PostHog.
How do I use the strip with a keyboard or a screen reader?
The 24 hours are real buttons in a list, and the strip is one tab stop: the chosen hour. The arrow keys move one hour at a time and Home and End jump to the first and last. Each button is named with its hour and count ("14:00, 4,820 events") and is pressed when chosen, so a screen reader hears the same text the readout shows. Hovering, tapping or focusing an hour chooses it.
How is the shading chosen?
Each cell takes one of five solid mixes of the foreground colour with the page, by its share of the busiest hour (under 10%, 30%, 60%, 85%, and above), and the chosen hour is ringed with a gap in the page colour, so no meaning rests on colour alone. There are no hues, so it reads the same in any theme, and the legend repeats the five steps.
Can I show PostHog's logo?
The block names PostHog in text and ships no PostHog logo, colour or wordmark. PostHog's tile is a neutral lettermark, Ph in a muted square, in an icon slot that a code comment marks: drop in the official mark only if you have the rights to use it, under the owner's brand guidelines, and never redraw it.
How does it fit on a phone, in right-to-left layouts and with reduced motion?
Below lg the strip becomes two rows of twelve, the top row 00:00 to 11:00 and the bottom row 12:00 to 23:00, and a line under it says so; the axis labels show from lg. A time series reads left to right in any language, so the strip and its labels keep that direction in a right-to-left layout. The header and the strip fade up once on load with CSS transitions, and the ring's change is off with reduced motion.
Related
- Pro
Event Checklist Map Detail Integration
With a product drawingAn integration detail section for an onboarding-checklist tool connecting to PostHog: what it can read and write as three read scopes, and a framed figure that joins three event names to the checklist steps they tick.
- Pro
Trigger Event Wall Grid Integration
Switch and tick gridsAn integration grid section for an onboarding-checklist tool connected to PostHog: eight event cells on shared hairlines, each a checkbox with the event name, how often it was seen this week and the checklist step it ticks, with a live tally.
- Pro
Cohort Sync Table List Integration
Synced tablesAn integration list section for an onboarding-checklist tool connected to PostHog: a table of seven cohorts with a type filter that holds the page's height, a state for each, and a Retry on the one that failed.
- Pro
Segment Stats Integration
Lines and dotsAn integration stats section for a tracking-plan checker working with Segment: four destinations as rows with a hand-drawn line of events delivered per day, one slider that moves a marker across all four, a readout for the chosen day and totals worked out from typed counts.
- Pro
Legend Filter Heatmap Stats
HeatmapsA twelve-week by seven-day commit heatmap whose five-step legend is a set of toggles: choosing a level keeps only those days at full strength, outlines the rest and counts the days.
- Pro
AWS Stats Integration
Bars and columnsAn integration stats section for a cloud cost tool reading from AWS: six region lanes on one 0 to 24 hour ruler showing how far each region's cost data runs behind, with a solid tick at the 6 hour agreement.