Skip to content
Get Kosh Pro
← 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
motion prop

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

PowerShell / install with a Kosh Pro key
npx shadcn@latest add @kosh-pro/activity-feed
React / TypeScript
import { 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

Activity Feed props
PropTypeDefaultWhat it does
dataT[] where T has id and atrequiredThe events, newest first. The id must be stable.
renderItem(item: T) => ReactNoderequiredWhat goes inside a row.
maxnumber6Rows kept on screen. Older rows leave.
rowHeightnumber56Row height in px. Fixed, so the list reserves max × rowHeight.
pauseOnHoverbooleantrueHold new arrivals while the pointer is over the list or focus is inside it.
announcebooleantrueSet false when the surrounding screen already announces the same update.
labelstring"Recent activity"The accessible name of the list.
Shared by every Kosh component
PropTypeDefaultWhat 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() => voidnoneCalled once the component has come to rest after an update.
classNamestringnoneAdded 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.