shadcn.io is not affiliated with official shadcn/ui
Cohort Sync Table List Integration Block for React
An 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.
Installation
Overview
An integration list 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 cohorts it reads from PostHog. A start-aligned header carries the title and a headline counted from the rows ("5 of 7 cohorts are in sync"), and at its end the mark pair (Cairnstep's own tile and PostHog's neutral lettermark tile). Under a band rule, a segmented filter (All, Dynamic, Static, each with its count) sits over a table that runs rail to rail: the cohort, its type, how many people, when Cairnstep last read it and its state. Synced has a filled dot, Stale a hollow one and Failed the status colour, each with its word. A dynamic cohort read more than a day ago shows Stale, and one cohort failed: its Retry goes to "Retrying" for about a second and then to Synced, with a polite foot line, present from load, saying what changed and that nothing was read. The live table sits over an unseen copy of the whole list in one grid cell, so the filter never moves the page. On a phone the type, people and read time fold under the cohort's name. 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, Segment Group, Status and Button around a native table, 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 cohorts, counts and times are example data.
FAQ
How is each state decided?
Failed is the one cohort marked as failed until its retry has run. Stale is any dynamic cohort whose last read, minutes in the data, is more than a day old: PostHog documents that a dynamic cohort updates once every 24 hours, so a read older than that has missed a recalculation. Everything else is Synced, and static cohorts, which don't change on their own, are never Stale. The headline and the foot line count the rows, so they follow every change.
What does Retry do?
It changes local state only. The button turns to "Retrying" and stays focusable under aria-disabled, so a second press does nothing; after about a second the cohort counts as read just now, its state becomes Synced, the button leaves, and the foot line takes focus so the result is read out. The line says nothing was read from PostHog. Wire it to your own sync and keep the same states.
Why doesn't the table jump when I filter?
The visible table and an unseen copy of the whole list share one grid cell, so the cell is always as tall as the full list and the rows below never move. The copy is hidden from assistive technology and can't be focused. The filter counts come from the data, and the foot line says how many cohorts are showing.
Is it a real table?
Yes: a native table with a visually hidden caption, header cells with scope, and each cohort's name as a row header. It sits in a focusable, named region so a keyboard can scroll it if a narrow screen ever overflows. On a phone the type, people and last read fold under the name, in one line that keeps the numbers together for right-to-left text.
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 md the table has two columns, the cohort with its folded facts and the state, and every row keeps one height so a retry doesn't move the rows below it. In a right-to-left layout the columns flip while counts keep their digits together. The header and list fade up once on load with CSS transitions; with reduced motion they simply appear.
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
Region And Key Setup Integration
Guided stepsAn integration setup section for an onboarding-checklist tool connecting to PostHog, in one hairline-framed panel with a vertical Steps rail: choose a region with radio cards, add the project key, send a test event that shows its capture payload.
- 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
Hourly Event Strip Stats Integration
Rings and talliesAn 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.
- Pro
Grouped Comments List Integration
Grouped and triagedAn integration list section for a design-docs tool connected to Figma: comments grouped by frame in an accordion running rail to rail, a toggle that hides resolved ones without moving a header, and a Retry for the one comment that failed to sync.
- Pro
Integration Log Changelog
APIs and integrationsFive connector changes as rows that run rail to rail and end the block, each with a neutral lettermark plate, a state badge, a day and a scopes popover listing what the connector reads and writes.