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/system-message

System Message

prompt-kit/system-message
FreeComponent

A banner-style component for surfacing contextual information, warnings, or instructions within AI interfaces.

Live preview

live · rendered by the registry
Rendered by prompt-kit on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/ibelick/prompt-kit/HEAD/public/c/system-message.json

Source

system-message.tsxraw.githubusercontent.com/ibelick/prompt-kit/HEAD/public/c/system-message.json
1"use client"
2
3import { Button } from "@/components/ui/button"
4import { cn } from "@/lib/utils"
5import { cva, type VariantProps } from "class-variance-authority"
6import { AlertCircle, AlertTriangle, Info } from "lucide-react"
7import React from "react"
8
9const systemMessageVariants = cva(
10 "flex flex-row items-center gap-3 rounded-[12px] border py-2 pr-2 pl-3",
11 {
12 variants: {
13 variant: {
14 action: "text-zinc-700 dark:text-zinc-300",
15 error: "text-red-700 dark:text-red-800",
16 warning: "text-amber-700 dark:text-amber-700",
17 },
18 fill: {
19 true: "bg-background",
20 false: "",
21 },
22 },
23 compoundVariants: [
24 {
25 variant: "action",
26 fill: true,
27 class: "bg-zinc-100 dark:bg-zinc-900 border-transparent",
28 },
29 {
30 variant: "error",
31 fill: true,
32 class: "bg-red-100 dark:bg-red-900/20 border-transparent",
33 },
34 {
35 variant: "warning",
36 fill: true,
37 class: "bg-amber-100 dark:bg-amber-900/20 border-transparent",
38 },
39 {
40 variant: "action",
41 fill: false,
42 class: "border-zinc-200 dark:border-zinc-800",
43 },
44 {
45 variant: "error",
46 fill: false,
47 class: "border-red-600 dark:border-red-900",
48 },
49 {
50 variant: "warning",
51 fill: false,
52 class: "border-amber-600 dark:border-amber-900",
53 },
54 ],
55 defaultVariants: {
56 variant: "action",
57 fill: false,
58 },
59 }
60)
61
62export type SystemMessageProps = React.ComponentProps<"div"> &
63 VariantProps<typeof systemMessageVariants> & {
64 icon?: React.ReactNode
65 isIconHidden?: boolean
66 cta?: {
67 label: string
68 onClick?: () => void
69 variant?: "solid" | "outline" | "ghost"
70 }
71 }
72
73export function SystemMessage({
74 children,
75 variant = "action",
76 fill = false,
77 icon,
78 isIconHidden = false,
79 cta,
80 className,
81 ...props
82}: SystemMessageProps) {
83 const getDefaultIcon = () => {
84 if (isIconHidden) return null
85
86 switch (variant) {
87 case "error":
88 return <AlertCircle className="size-4" />
89 case "warning":
90 return <AlertTriangle className="size-4" />
91 default:
92 return <Info className="size-4" />
93 }
94 }
95
96 const getIconToShow = () => {
97 if (isIconHidden) return null
98 if (icon) return icon
99 return getDefaultIcon()
100 }
101
102 const shouldShowIcon = getIconToShow() !== null
103
104 return (
105 <div
106// … truncated

What it pulls in

Other registry items

  • button

Files it writes

  • components/prompt-kit/system-message.tsx

Facts

Registry
prompt-kit
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
today

Go to the source

Docs on prompt-kit prompt-kit.com ibelick/prompt-kit on GitHub Raw registry item This item as JSON

More from prompt-kit

All 23 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Chain Of Thoughtchain-of-thoughtprompt-kitComponentsFree1 dep
Chat Containerchat-containerprompt-kitComponentsFree1 dep
Code Blockcode-blockprompt-kitComponentsFree1 dep
Feedback Barfeedback-barprompt-kitComponentsFree1 dep
File Uploadfile-uploadprompt-kitComponentsFreeno deps
Imageimageprompt-kitComponentsFreeno deps
Jsx Previewjsx-previewprompt-kitComponentsFree1 dep
Loaderloaderprompt-kitComponentsFreeno deps
BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex

BlockDex

Built by

Kynth Studio

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

BlockDex