### Install Prompt Kit Component via npx Source: https://www.prompt-kit.com/ai-sdk This command allows you to quickly install a specific Prompt Kit component into your project. It uses `npx` to execute the installation script from the provided URL. Ensure you have Node.js and npm installed. ```bash npx shadcn@latest add "https://prompt-kit.com/c/[COMPONENT].json" ``` -------------------------------- ### Installation Source: https://www.prompt-kit.com/docs/source Instructions for installing the Source component using the shadcn CLI. ```APIDOC ## Installation Use the following command to add the Source component to your project: ```bash npx shadcn add "https://prompt-kit.com/c/source.json" ``` ``` -------------------------------- ### Installation Source: https://www.prompt-kit.com/docs/markdown Instructions on how to install the Markdown component using the shadcn CLI. ```APIDOC ## Installation ### Description Instructions on how to install the Markdown component using the shadcn CLI. ### Method CLI Command ### Endpoint N/A ### Parameters None ### Request Example ```bash npx shadcn add "https://prompt-kit.com/c/markdown.json" ``` ### Response N/A ``` -------------------------------- ### Installation Source: https://www.prompt-kit.com/llms-full Instructions for installing the CodeBlock component using either the CLI or manual methods. ```APIDOC ## Installation ### CLI Installation Use the following command to add the CodeBlock component to your project: ```bash npx shadcn add "https://prompt-kit.com/c/code-block.json" ``` ### Manual Installation 1. **Copy and paste** the following code into your project. ```tsx // components/prompt-kit/code-block.tsx // ... component code ... ``` 2. **Install dependencies**: `npm install shiki` 3. **Update import paths** to match your project setup. ``` -------------------------------- ### Installation - Manual Source: https://www.prompt-kit.com/llms-full Manually install the Message component by copying the code into your project. ```APIDOC ## Installation - Manual Copy and paste the following code into your project. Update the import paths to match your project setup. ``` -------------------------------- ### Installation Source: https://www.prompt-kit.com/llms-full Instructions for installing the Prompt Kit library using either the CLI or manual steps. ```APIDOC ## Installation ### CLI Installation Use the following command to add Prompt Kit to your project: ```bash npx shadcn add "https://prompt-kit.com/c/prompt-suggestion.json" ``` ### Manual Installation 1. Copy and paste the provided code into your project. 2. Update the import paths to match your project structure. ```tsx // components/prompt-kit/prompt-suggestion.tsx // Add the component code here ``` ``` -------------------------------- ### Loader Installation Source: https://www.prompt-kit.com/llms-full Instructions for installing the Loader component using CLI or manual methods. ```APIDOC ## Installation ### CLI Installation Use the following command to add the Loader component to your project: ```bash npx shadcn add "https://prompt-kit.com/c/loader.json" ``` _Note: If you are using Tailwind CSS v4, you may have to grab the keyframes and add them to your global.css file manually. Check manual installation for more details._ ### Manual Installation 1. **Copy and paste the following CSS into your `global.css` file:** ```css @keyframes typing { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-2px); opacity: 1; } } @keyframes loading-dots { 0%, 100% { opacity: 0; } 50% { opacity: 1; } } @keyframes wave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.6); } } @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } @keyframes text-blink { 0%, 100% { color: var(--primary); } 50% { color: var(--muted-foreground); } } @keyframes bounce-dots { 0%, 100% { transform: scale(0.8); opacity: 0.5; } 50% { transform: scale(1.2); opacity: 1; } } @keyframes thin-pulse { 0%, 100% { transform: scale(0.95); opacity: 0.8; } 50% { transform: scale(1.05); opacity: 0.4; } } @keyframes pulse-dot { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.5); opacity: 1; } } @keyframes shimmer-text { 0% { background-position: 150% center; } 100% { background-position: -150% center; } } @keyframes wave-bars { 0%, 100% { transform: scaleY(1); opacity: 0.5; } 50% { transform: scaleY(0.6); opacity: 1; } } @keyframes shimmer { 0% { background-position: 200% 50%; } 100% { background-position: -200% 50%; } } @keyframes spinner-fade { 0% { opacity: 0; } 100% { opacity: 1; } } ``` 2. **Copy and paste the following code into your project:** ```tsx // components/prompt-kit/loader.tsx (example file path) // ... component code ... ``` 3. **Update the import paths to match your project setup.** ``` -------------------------------- ### Install Prompt Kit Response Stream via CLI Source: https://www.prompt-kit.com/llms-full This command installs the response stream functionality using the shadcn CLI. Ensure you have shadcn/ui installed in your project. ```bash npx shadcn add "https://prompt-kit.com/c/response-stream.json" ``` -------------------------------- ### Installation Source: https://www.prompt-kit.com/docs/chain-of-thought Instructions on how to install the Chain of Thought component using npx. ```APIDOC ## Installation To install the Chain of Thought component, use the following npx command: ```bash npx shadcn add "https://prompt-kit.com/c/chain-of-thought.json" ``` ``` -------------------------------- ### Installation Source: https://www.prompt-kit.com/docs/chat-container Instructions on how to install the Chat Container component using the shadcn CLI. ```APIDOC ## Installation ### Description Install the Chat Container component using the following command: ### Method CLI Command ### Endpoint Not applicable ### Parameters None ### Request Example ```bash npx shadcn add "https://prompt-kit.com/c/chat-container.json" ``` ### Response #### Success Response (200) Installation successful. #### Response Example ``` Component added successfully. ``` ``` -------------------------------- ### Installation - CLI Source: https://www.prompt-kit.com/llms-full Install the Message component using the provided CLI command. ```APIDOC ## Installation - CLI ``` -------------------------------- ### Install Prompt Kit Loader via CLI Source: https://www.prompt-kit.com/llms-full Installs the Prompt Kit loader component using npx. This command fetches the loader configuration from a remote JSON file. Ensure you have Node.js and npm installed. The command's output is the loader installation. ```bash npx shadcn add "https://prompt-kit.com/c/loader.json" ``` -------------------------------- ### Install Source Component CLI Source: https://www.prompt-kit.com/docs/source This command installs the Source component and its related functionalities into your project using npx. It fetches the necessary configuration from the provided URL. ```bash npx shadcn add "https://prompt-kit.com/c/source.json" ``` -------------------------------- ### Examples Source: https://www.prompt-kit.com/docs/system-message Examples demonstrating various use cases and configurations of the System Message component. ```APIDOC # System Message ## Examples ### Basic system message PreviewCode ``` This conversation is visible to your team. Avoid sharing sensitive personal data. You can switch to a private workspace at any time from the header. ``` ### Filled variants PreviewCode ``` The model is running in reasoning mode. Responses might take slightly longer. Context window is close to the limit. Summarize the conversation or archive older messages. The tool integration failed. Review the API credentials before retrying the request. ``` ### With CTA PreviewCode ``` This workspace enforces human review. Make sure a teammate signs off on the final response before sending it to the customer. Review policy ``` ``` -------------------------------- ### Install Prompt Kit Chat Container using CLI Source: https://www.prompt-kit.com/docs/chat-container This command installs the Chat Container component from Prompt Kit using the shadcn CLI. Ensure you have Node.js and npm/yarn installed. ```bash npx shadcn add "https://prompt-kit.com/c/chat-container.json" ``` -------------------------------- ### Install Prompt Suggestion CLI Source: https://www.prompt-kit.com/llms-full Installs the prompt suggestion component using the shadcn CLI. This command fetches the necessary configuration to integrate the component into your project. ```bash npx shadcn add "https://prompt-kit.com/c/prompt-suggestion.json" ``` -------------------------------- ### Install JSX Preview Component via CLI Source: https://www.prompt-kit.com/llms-full Installs the JSX Preview component using the shadcn CLI. This command fetches the necessary configuration to add the component to your project. ```bash npx shadcn add "https://prompt-kit.com/c/jsx-preview.json" ``` -------------------------------- ### Install Prompt Kit Markdown Component Source: https://www.prompt-kit.com/docs/markdown Installs the Prompt Kit Markdown component using npm or npx. This command fetches the necessary files to integrate the component into your project. ```bash npx shadcn add "https://prompt-kit.com/c/markdown.json" ``` -------------------------------- ### Install Tool Component via CLI Source: https://www.prompt-kit.com/llms-full Installs the Tool component using the shadcn CLI. This command fetches the necessary configuration to add the component to your project. ```bash npx shadcn add "https://prompt-kit.com/c/tool.json" ``` -------------------------------- ### Install Reasoning Component using CLIManual Source: https://www.prompt-kit.com/docs/reasoning Installs the Reasoning component into your project using the npx shadcn command. This command fetches the component definition from the provided URL. ```bash npx shadcn add "https://prompt-kit.com/c/reasoning.json" ``` -------------------------------- ### Install Image Component using shadcn-ui Source: https://www.prompt-kit.com/docs/image This command installs the Image component using the shadcn-ui CLI. Ensure you have shadcn-ui set up in your project. ```bash npx shadcn add "https://prompt-kit.com/c/image.json" ``` -------------------------------- ### Installation Command for Prompt Kit Code Block Source: https://www.prompt-kit.com/docs/code-block The command to install the Code Block component into your project using `shadcn-ui`. ```bash npx shadcn add "https://prompt-kit.com/c/code-block.json" ``` -------------------------------- ### Basic Loader Example Source: https://www.prompt-kit.com/llms-full Displays various loader variants with their default settings. This example showcases the fundamental appearance and behavior of the loader component. ```tsx import React from "react" import { LoaderBasic } from "@/components/prompt-kit/loader-basic" export function LoaderBasicShowcase() { return } ``` -------------------------------- ### Example - Basic Message Source: https://www.prompt-kit.com/llms-full Demonstrates the basic usage of the Message component. ```APIDOC ## Example - Basic Message } filePath="app/docs/message/message-basic.tsx" classNameComponentContainer="p-8" /> ``` -------------------------------- ### Install File Upload Component via CLI Source: https://www.prompt-kit.com/llms-full Installs the File Upload component using the shadcn CLI. This is the quickest way to add the component to your project. ```bash npx shadcn add "https://prompt-kit.com/c/file-upload.json" ``` -------------------------------- ### Installation Source: https://www.prompt-kit.com/docs/system-message Install the System Message component using the provided npm command. ```APIDOC ## Installation CLIManual ``` npx shadcn add "https://prompt-kit.com/c/system-message.json" ``` ``` -------------------------------- ### Install Markdown Component Manually Source: https://www.prompt-kit.com/llms-full This section provides instructions for manually installing the Markdown component. It involves copying code into your project, installing dependencies like react-markdown and remark-gfm, and updating import paths. ```tsx import React from "react" import ReactMarkdown from "react-markdown" import remarkGfm from "remark-gfm" import remarkBreaks from "remark-breaks" interface MarkdownProps { children: string className?: string components?: Partial['components'] } const INITIAL_COMPONENTS = {} export const Markdown: React.FC = ({ children, className, components = INITIAL_COMPONENTS, ...props }) => { return ( {children} ) } ``` -------------------------------- ### Install System Message Component with npx Source: https://www.prompt-kit.com/docs/system-message Installs the System Message component by adding its JSON configuration URL using npx. This command assumes you have npx installed and configured. ```bash npx shadcn add "https://prompt-kit.com/c/system-message.json" ``` -------------------------------- ### Manual installation of prompt-input component Source: https://www.prompt-kit.com/llms-full Provides the necessary code to manually install the 'prompt-input' component. Copy and paste this code into your project's components directory and adjust import paths as needed. ```tsx import React from "react"; import { Textarea, TextareaProps, } from "@/components/ui/textarea"; import { Button } from "@/components/ui/button"; import { IconSend, IconPlus, IconPaperclip, } from "@tabler/icons-react"; interface PromptInputProps extends TextareaProps { actions?: React.ReactNode; } export const PromptInput = React.forwardRef( ({ className, actions, ...props }, ref) => { return (