Skip to content
roguelite labsAnthony Spezzano ↗

Prompt

React components for chat interfaces. Each entry includes the code and styles used in its example.

Input
PromptInput
PromptInput
Auto-resizing textarea with send button and keyboard shortcut hints. Submits on Enter, newline on Shift+Enter.
FeedbackBar
FeedbackBar
Thumbs up/down rating bar for AI responses. Optionally reveals a comment textarea on thumbs-down.
FileUpload
FileUpload
Drag-and-drop file upload zone with click-to-browse and uploaded file list.
PromptSuggestion
PromptSuggestion
Clickable suggestion chip for pre-filling prompt ideas. Supports an optional icon prefix.
Display
MessageThread
MessageThread
Renders a list of user/assistant messages as styled chat bubbles with proper alignment.
StreamText
StreamText
Character-by-character streaming text simulation with blinking cursor. Optionally loops.
ModelBadge
ModelBadge
Compact chip showing model name, version, provider, and optional live status dot.
ChainOfThought
ChainOfThought
Collapsible reasoning chain showing numbered steps with done/active/pending status indicators.
CodeBlock
CodeBlock
Styled code display with language badge, optional filename, and one-click copy button.
Markdown
Markdown
Zero-dependency markdown renderer. Parses headings, bold, italic, inline code, fenced blocks, lists, and links.
Message
Message
Structured message row with avatar initial, sender name, timestamp, and slot for content.
Reasoning
Reasoning
Collapsible reasoning block with animated expand/collapse. Shows streaming dots while thinking.
ResponseStream
ResponseStream
Multi-paragraph streaming text display with blinking cursor for in-progress AI responses.
Source
Source
Citation chip with index number, title, and domain. Hover to reveal excerpt.
Steps
Steps
Vertical numbered step list for multi-step AI processes with complete/current/upcoming states.
SystemMessage
SystemMessage
Centered muted divider message for chat events like model changes or context clears.
Tool
Tool
Collapsible tool call display showing name, JSON input, output, and running/done/error status.
Feedback
ThinkingDots
ThinkingDots
Animated three-dot loading indicator for AI thinking state. Pure CSS, no dependencies.
Loader
Loader
Four loading variants: animated dots, spinning ring, pulsing circle, and progress bar fill.
TokenCounter
TokenCounter
Live token count with spring-animated number and a color-coded fill bar that shifts green→yellow→red as tokens approach the limit.
Layout
ChatContainer
ChatContainer
Scrollable fixed-height container that auto-scrolls to bottom when children change.
Navigation
ScrollButton
ScrollButton
Animated jump-to-bottom button for chat interfaces. Fades in/out with framer-motion.
ModelSelector
ModelSelector
Dropdown for selecting an AI model. Shows the active model and provider badge; opens an animated popover listing models with colored dots and capability descriptions.
AbilitySelector
AbilitySelector
Toggleable grid of AI capability chips (Web Search, Code Exec, etc.). Selected chips highlight with an animated checkmark.