Krizaka UI
Krizaka UI

Activity feed

What happened, newest first: grouped by day, runs folded (“×3”), “2 min ago” kept fresh, new events announced — and Timeline, one thing's history on a rail.

Web · ✓Mobile · ✓Bureau · ✓BêtaAffichage de données
Niveau de support
Bêta
Taille
2.5 kB gzip, budget 2.5 kB
Qui l'utilise
1 fichiers des produits et sites en production l'importent Compté dans l'inventaire daté du 2026-11-23.
import { ActivityFeed, Timeline } from "@krizaka/ui/activity-feed";

Web et mobile — le même composant pour React et React Native. Bêta : son API peut encore changer à une version mineure.

Pourquoi il est là. Sovkora's job history (the adoption of Elements, PS-E).

Quand l’utiliser

  • Sovkora's job activity, a creator's notifications and tips.
  • The bids of a live auction (live).
  • A payout's or a job's history (Timeline).

Quand ne pas l’utiliser

  • For the steps still to come of a process.À la place : Stepper
  • For records to browse or select.À la place : List

Installation

Installer

npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcss

Styles

@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";

Importer

import { ActivityFeed, Timeline } from "@krizaka/ui/activity-feed";

Exemples

Activity

By day, three tips folded into one, how long ago.

Live

New bids announced, each led by its bidder's avatar.

Timeline

A payout's history, oldest first.

Props

ActivityFeed

What happened, newest first: grouped by day, runs folded (“Mina tipped ×3”), “2 min ago” kept fresh, new events announced when live. Sovkora's job activity, a creator's notifications, the console's audit log.

PropTypeDéfautDescription
aria-labelrequisstring—The feed's accessible name (“Activity”).
eventsrequisreadonly T[]—The events, in any order.
nowrequisDate—Now, for the “… ago” and the day headings: the host gives the time (from the server, the same text on both sides); the feed never reads the clock.
action((event: T) => ReactNode)—After an event's text: an action (Reply, View).
classNamestring—Classes merged on the root.
emptyReactNode—Shown when there is no event (an EmptyState).
foldbooleantrueFold the runs of the same actor and kind. Default true.
labelsPartial<ActivityFeedLabels>—The words, passed translated; English by default.
leading((event: T) => ReactNode)—Before an event's text: its actor's Avatar, an icon.
liveboolean—Announce new events politely (a stream).
localestringen-USThe locale of the dates and the “… ago”. Default en-US.
tickingbooleantrueKeep the “… ago” fresh: the feed's time moves a minute every minute from now. Default true.

Timeline

One thing's history on a rail, oldest first: each event a marker in its tone, its time and its words.

PropTypeDéfautDescription
aria-labelrequisstring—The timeline's accessible name (“History of the payout”).
eventsrequisreadonly T[]—One thing's events, oldest first (a job's run, a payout's life).
classNamestring—Classes merged on the list.
localestringen-USThe locale of the times. Default en-US.
timeStyle"time" | "date" | "datetime"timeHow a time is written: time (14:02, default), datetime, date.

Accessibilité

  • Days are headings; each time is a time with its full date.
  • live announces how many new events arrived, politely, never each one.

Bonnes pratiques

  • Write each event as a sentence (“Mina tipped your video $5”), passed translated.
  • Give actor and kind to fold repeated events.
  • Pass now from the server to render the same “… ago” on both sides.

Générée depuis le code de @krizaka/ui 5.3.4 : son meta.ts, ses exemples et ses types.Modifier cette documentation sur GitHub

Sur cette page