← All components
Motion
ComponentsActivity Feed
Activity Feed
Make room for what just happened.
- Motion layer
- Implemented
- Kosh Pro · $15 once
- Logged 18 minutes
- Weekly goal met
- Streak reached 215 days
- Logged 42 minutes
onSettle has fired 0 times. The prop can only calm this component further. The switch at the top of the page and your system setting still apply.
Why it moves this way
Lists that re-render in place make you find your row again. Making room visibly tells you two things at once: something arrived, and everything you were looking at is still there, one row down. And while you are reading, it waits.
Use it
npx shadcn@latest add @kosh-pro/activity-feedimport { ActivityFeed } from "@/kosh/activity-feed/activity-feed";
<ActivityFeed
data={events} // newest first: { id, at, ...yours }
max={5}
rowHeight={56}
renderItem={(event) => <span>{event.text}</span>}
/>Activity Feed is part of Kosh Pro. Your license key unlocks the @kosh-pro registry, which installs it with the motion core it needs. Set up the Pro registry ↗ Get Kosh Pro ↗
At each motion level
full- The new row drops in from above while the rows below slide down one place (about 380 ms). A signal marker on the new row fades over 2.4 s. The row pushed past the limit fades out.
reduced- Rows do not slide. They are in their new places, and the new row fades in. The marker still fades.
none- The list is simply the new list.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
data | T[] where T has id and at | required | The events, newest first. The id must be stable. |
renderItem | (item: T) => ReactNode | required | What goes inside a row. |
max | number | 6 | Rows kept on screen. Older rows leave. |
rowHeight | number | 56 | Row height in px. Fixed, so the list reserves max × rowHeight. |
pauseOnHover | boolean | true | Hold new arrivals while the pointer is over the list or focus is inside it. |
announce | boolean | true | Set false when the surrounding screen already announces the same update. |
label | string | "Recent activity" | The accessible name of the list. |
| Prop | Type | Default | What it does |
|---|---|---|---|
motion | "auto" | "full" | "reduced" | "none" | "auto" | Motion for this component only. The calmest of this prop, the provider and the operating system wins. |
tone | "ink" | "signal" | "muted" | "ink" | Which colour carries the data. |
onSettle | () => void | none | Called once the component has come to rest after an update. |
className | string | none | Added to the root element. |
Theme with CSS variables on any ancestor: --k-line, --k-signal.
Accessibility
- The list is a polite log: a screen reader hears each new row once, never the whole list again.
- It holds still while the pointer is over it or focus is inside it, shows how many items are waiting, and catches up when you leave or press that count.
- DOM order matches visual order, newest first.
Limits and differences
- Row height is fixed. Rows of different heights would need Motion's layout feature and a layout read per update.