BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/jolyui/ui/ai-prompt-box

ai-prompt-box

jolyui-ui/ai-prompt-box
FreeComponent

jolyui/ui publishes no description for this item.

Install it

npx shadcn@latest add https://jolyui.dev/r/ai-prompt-box.json

Source

ui/ai-prompt-box.tsxjolyui.dev/r/ai-prompt-box.json · first 6 KB
1import * as DialogPrimitive from "@radix-ui/react-dialog";
2import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3import { AnimatePresence, motion } from "framer-motion";
4import {
5 ArrowUp,
6 BrainCog,
7 FolderCode,
8 Globe,
9 Mic,
10 Paperclip,
11 Square,
12 StopCircle,
13 X,
14} from "lucide-react";
15import Image from "next/image";
16import React from "react";
17
18// Utility function for className merging
19const cn = (...classes: (string | undefined | null | false)[]) =>
20 classes.filter(Boolean).join(" ");
21
22// Embedded CSS for minimal custom styles
23const styles = `
24 *:focus-visible {
25 outline-offset: 0 !important;
26 --ring-offset: 0 !important;
27 }
28 textarea::-webkit-scrollbar {
29 width: 6px;
30 }
31 textarea::-webkit-scrollbar-track {
32 background: transparent;
33 }
34 textarea::-webkit-scrollbar-thumb {
35 background-color: #444444;
36 border-radius: 3px;
37 }
38 textarea::-webkit-scrollbar-thumb:hover {
39 background-color: #555555;
40 }
41`;
42
43// Hook to inject styles on client only
44const useStyleInjection = () => {
45 React.useEffect(() => {
46 const styleId = "ai-prompt-box-styles";
47 if (typeof document !== "undefined" && !document.getElementById(styleId)) {
48 const styleSheet = document.createElement("style");
49 styleSheet.id = styleId;
50 styleSheet.innerText = styles;
51 document.head.appendChild(styleSheet);
52 }
53 }, []);
54};
55
56// Textarea Component
57interface TextareaProps
58 extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
59 className?: string;
60}
61const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
62 ({ className, ...props }, ref) => (
63 <textarea
64 className={cn(
65 "scrollbar-thin scrollbar-thumb-[#444444] scrollbar-track-transparent hover:scrollbar-thumb-[#555555] flex min-h-[44px] w-full resize-none rounded-md border-none bg-transparent px-3 py-2.5 text-base text-gray-100 placeholder:text-gray-400 focus-visible:outline-none focus-visible:ring-0 disabled:cursor-not-allowed disabled:opacity-50",
66 className,
67 )}
68 ref={ref}
69 rows={1}
70 {...props}
71 />
72 ),
73);
74Textarea.displayName = "Textarea";
75
76// Tooltip Components
77const TooltipProvider = TooltipPrimitive.Provider;
78const Tooltip = TooltipPrimitive.Root;
79const TooltipTrigger = TooltipPrimitive.Trigger;
80const TooltipContent = React.forwardRef<
81 React.ElementRef<typeof TooltipPrimitive.Content>,
82 React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
83// … truncated

What it pulls in

npm packages

  • motion
  • @radix-ui/react-dialog
  • @radix-ui/react-tooltip
  • lucide-react

Files it writes

  • ui/ai-prompt-box.tsx

Facts

Registry
jolyui/ui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-07
Last confirmed
today

Go to the source

jolyui.dev Johuniq/jolyui on GitHub Raw registry item This item as JSON

More from jolyui/ui

All 199 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
animated-beamanimated-beamjolyui/uiComponentsFree1 dep
animated-tableanimated-tablejolyui/uiComponentsFree2 deps
animated-theme-toggleanimated-theme-togglejolyui/uiComponentsFree2 deps
animated-toastanimated-toastjolyui/uiComponentsFree2 deps
animated-tooltipanimated-tooltipjolyui/uiComponentsFree1 dep
bento-gridbento-gridjolyui/uiComponentsFreeno deps
buttonbuttonjolyui/uiComponentsFree3 deps
calendercalenderjolyui/uiComponentsFree3 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