BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/prompt-kit/message

Message

prompt-kit-agents-ui/message
FreeComponent

A component for displaying chat messages with support for avatars, markdown content, and interactive actions

Install it

npx shadcn@latest add https://raw.githubusercontent.com/agents-ui/agents-kit/main/public/c/message.json

Source

message.tsxraw.githubusercontent.com/agents-ui/agents-kit/main/public/c/message.json
1import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
2import {
3 Tooltip,
4 TooltipContent,
5 TooltipProvider,
6 TooltipTrigger,
7} from "@/components/ui/tooltip"
8import { cn } from "@/lib/utils"
9import { Markdown } from "./markdown"
10
11export type MessageProps = {
12 children: React.ReactNode
13 className?: string
14} & React.HTMLProps<HTMLDivElement>
15
16const Message = ({ children, className, ...props }: MessageProps) => (
17 <div className={cn("flex gap-3", className)} {...props}>
18 {children}
19 </div>
20)
21
22export type MessageAvatarProps = {
23 src: string
24 alt: string
25 fallback?: string
26 delayMs?: number
27 className?: string
28}
29
30const MessageAvatar = ({
31 src,
32 alt,
33 fallback,
34 delayMs,
35 className,
36}: MessageAvatarProps) => {
37 return (
38 <Avatar className={cn("h-8 w-8 shrink-0", className)}>
39 <AvatarImage src={src} alt={alt} />
40 {fallback && (
41 <AvatarFallback delayMs={delayMs}>{fallback}</AvatarFallback>
42 )}
43 </Avatar>
44 )
45}
46
47export type MessageContentProps = {
48 children: React.ReactNode
49 markdown?: boolean
50 className?: string
51} & React.ComponentProps<typeof Markdown> &
52 React.HTMLProps<HTMLDivElement>
53
54const MessageContent = ({
55 children,
56 markdown = false,
57 className,
58 ...props
59}: MessageContentProps) => {
60 const classNames = cn(
61 "rounded-lg p-2 text-foreground bg-secondary prose break-words whitespace-normal",
62 className
63 )
64
65 return markdown ? (
66 <Markdown className={classNames} {...props}>
67 {children as string}
68 </Markdown>
69 ) : (
70 <div className={classNames} {...props}>
71 {children}
72 </div>
73 )
74}
75
76export type MessageActionsProps = {
77 children: React.ReactNode
78 className?: string
79} & React.HTMLProps<HTMLDivElement>
80
81const MessageActions = ({
82 children,
83 className,
84 ...props
85}: MessageActionsProps) => (
86 <div
87 className={cn("text-muted-foreground flex items-center gap-2", className)}
88 {...props}
89 >
90 {children}
91 </div>
92)
93
94export type MessageActionProps = {
95 className?: string
96 tooltip: React.ReactNode
97 children: React.ReactNode
98 side?: "top" | "bottom" | "left" | "right"
99} & React.ComponentProps<typeof Tooltip>
100
101const MessageAction = ({
102 tooltip,
103 children,
104 className,
105 side = "top",
106 ...props
107}: MessageActionProps) => {
108 return (
109 <TooltipProvider>
110 <Tooltip {...props}>
111 <TooltipTrigger asChild>{children}</TooltipTrigger>
112 <TooltipContent side={side} className={className}>
113 {tooltip}
114// … truncated

What it pulls in

npm packages

  • react-markdown
  • remark-gfm
  • shiki
  • marked
  • remark-breaks

Other registry items

  • avatar
  • tooltip

Files it writes

  • components/prompt-kit/message.tsx
  • components/prompt-kit/markdown.tsx
  • components/prompt-kit/code-block.tsx

Facts

Registry
prompt-kit
Type
registry:ui
Access
Free
Files written
3
Licence
NOASSERTION
In the index
at or before 2026-08-11
Last confirmed
3 days ago

Go to the source

agents-ui.github.io agents-ui/agents-kit on GitHub Raw registry item This item as JSON

More from prompt-kit

All 12 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Chat Containerchat-containerprompt-kitComponentsFree1 dep
Code Blockcode-blockprompt-kitComponentsFree1 dep
File Uploadfile-uploadprompt-kitComponentsFreeno deps
Jsx Previewjsx-previewprompt-kitComponentsFree1 dep
Loaderloaderprompt-kitComponentsFreeno deps
Markdownmarkdownprompt-kitComponentsFree4 deps · 2 files
Prompt Inputprompt-inputprompt-kitComponentsFreeno deps
Prompt Suggestionprompt-suggestionprompt-kitComponentsFree2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex