# Shadcn Streaming Code Components

A code block for AI chat and agent UIs that stays readable while the agent is still writing: lines appear as they stream, the body follows the newest line, a status pill flips from Writing to Ready and copy, diff and Apply or Reject actions are ready when the file is complete. Built on Code Block with Shiki highlighting.

- Page: https://shadcnuikit.com/components/streaming-code
- Variants: 8 (8 free, 0 pro)
- Built with shadcn/ui, Tailwind CSS v4, React and Next.js

- [Basic](https://shadcnuikit.com/components/streaming-code/1) (Free, install: `npx shadcn@latest add @shadcnuikit/streaming-code1`)
- [Complete with copy](https://shadcnuikit.com/components/streaming-code/2) (Free, install: `npx shadcn@latest add @shadcnuikit/streaming-code2`)
- [Highlighted lines](https://shadcnuikit.com/components/streaming-code/3) (Free, install: `npx shadcn@latest add @shadcnuikit/streaming-code3`)
- [Streaming diff](https://shadcnuikit.com/components/streaming-code/4) (Free, install: `npx shadcn@latest add @shadcnuikit/streaming-code4`)
- [Multiple files](https://shadcnuikit.com/components/streaming-code/5) (Free, install: `npx shadcn@latest add @shadcnuikit/streaming-code5`)
- [Apply or reject](https://shadcnuikit.com/components/streaming-code/6) (Free, install: `npx shadcn@latest add @shadcnuikit/streaming-code6`)
- [Inside a chat message](https://shadcnuikit.com/components/streaming-code/7) (Free, install: `npx shadcn@latest add @shadcnuikit/streaming-code7`)
- [Terminal output](https://shadcnuikit.com/components/streaming-code/8) (Free, install: `npx shadcn@latest add @shadcnuikit/streaming-code8`)

## Install with the shadcn CLI

Add the registry to components.json once:

```json
"registries": {
  "@shadcnuikit": {
    "url": "https://shadcnuikit.com/r/{name}.json",
    "headers": {
      "Authorization": "Bearer ${REGISTRY_TOKEN}"
    }
  }
}
```

Then install any item by its registry name, for example `npx shadcn@latest add @shadcnuikit/hero1`. Free items install without an API key. Pro items need a license and an API key from https://shadcnuikit.com/account/api-keys, set as REGISTRY_TOKEN in your .env file.

More from Shadcn UI Kit: [llms.txt](https://shadcnuikit.com/llms.txt)