# Feed

Dated events in order on a vertical rule: who did what, and when.

[View Feed on CyberSpec](https://www.cyberspec.dev/components/sidebar/feed)

## Component

Feed belongs to the Data group in the CyberSpec catalog. It uses @ui-sdk/react/timeline.

## Installation

Use a React 19 project with shadcn configured. Render the installed components inside the Cyber root, and import your global stylesheet in the app entry point.

```sh
bunx --bun shadcn@latest add https://www.cyberspec.dev/r/feed.json
```

## Example

```tsx
"use client"

import { Feed, type FeedItem } from "@/components/ui/feed"

const events: FeedItem[] = [
  { id: "brief", time: "21:04", actor: "Mara Voss", text: "Posted the job: a ledger out of the Onyx annex in Glasswater." },
  { id: "route", time: "21:19", actor: "Dex Marlowe", text: "Route cleared through Cinder Row. Eleven minutes door to door." },
  { id: "ghostwrite", time: "21:32", actor: "Ghostwrite", text: "Rewrote the badge log for the service lift.", tone: "signal" },
  { id: "trace", time: "21:36", actor: "Vanta relay", text: "Trace detected on node 3F:A2. Link rerouted.", tone: "flag" },
  { id: "inside", time: "21:41", actor: "Sable Quinn", text: "Inside. Fourth floor, east stair." },
]

export default function FeedDemo() {
  return (
    <>
      <Feed label="Job activity" items={events} live />
    </>
  )
}
```

## Install this example

```sh
bunx --bun shadcn@latest add https://www.cyberspec.dev/r/feed-demo.json
```

## Resources

- [Interactive Feed preview](https://www.cyberspec.dev/preview/feed)
- [Component catalog](https://www.cyberspec.dev/components.md)
- [Feed source code](https://github.com/agnelnieves/cyberspec/blob/main/registry/cyber/ui/feed.tsx)
- [Shadcn registry item](https://www.cyberspec.dev/r/feed.json)
