
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Beautiful, accessible React components for AI chat interfaces. Copy, paste, ship.
Beautiful, accessible React components for AI chat interfaces. Copy, paste, ship.
Unlike traditional component libraries, aichatkit uses the copy-paste approach popularized by shadcn/ui. This gives you full control over your components.
# Create your components directory
mkdir -p src/components/ai-ui
# Copy the components you need
npx aichatkit@latest add chat
npm install clsx react-markdown remark-gfm react-syntax-highlighter
npm install -D @types/react-syntax-highlighter
import { Chat, MessageType } from '@/components/ai-ui'
import { useState } from 'react'
function ChatDemo() {
const [messages, setMessages] = useState<MessageType[]>([])
const [isStreaming, setIsStreaming] = useState(false)
const handleSendMessage = async (content: string) => {
// Add user message
const userMessage: MessageType = {
id: Date.now().toString(),
role: 'user',
content,
timestamp: new Date()
}
setMessages(prev => [...prev, userMessage])
setIsStreaming(true)
// Call your AI API here
const response = await fetch('/api/chat', {
method: 'POST',
body: JSON.stringify({ messages: [...messages, userMessage] })
})
// Handle streaming response
const reader = response.body?.getReader()
// ... handle streaming
}
return (
<Chat
messages={messages}
onSendMessage={handleSendMessage}
isStreaming={isStreaming}
placeholder="Ask me anything..."
/>
)
}
import { Chat, MessageType } from '@/components/ai-ui'
import { useChat } from 'ai/react' // Vercel AI SDK
function StreamingChat() {
const { messages, input, handleInputChange, handleSubmit, isLoading } = useChat()
// Convert Vercel AI SDK messages to our format
const chatMessages: MessageType[] = messages.map(m => ({
id: m.id,
role: m.role as 'user' | 'assistant',
content: m.content,
timestamp: new Date(m.createdAt || Date.now())
}))
return (
<Chat
messages={chatMessages}
onSendMessage={handleSubmit}
isStreaming={isLoading}
value={input}
onChange={handleInputChange}
/>
)
}
// Use CSS variables for theming
<style>
{`
:root {
--ai-primary: #8b5cf6;
--ai-primary-hover: #7c3aed;
--ai-background: #fafafa;
--ai-surface: #ffffff;
--ai-border: #e4e4e7;
}
`}
</style>
import { Message, MessageList, ChatInput } from '@/components/ai-ui'
// Use components individually
<MessageList messages={messages} />
<Message
message={{
id: '1',
role: 'assistant',
content: 'Hello! How can I help you today?'
}}
onRetry={() => console.log('Retry')}
onCopy={() => console.log('Copied')}
/>
<ChatInput
onSend={handleSend}
placeholder="Type your message..."
isStreaming={false}
/>
:root {
/* Colors */
--ai-primary: #0066cc;
--ai-background: #ffffff;
--ai-surface: #f8f9fa;
--ai-border: #e5e7eb;
--ai-text: #1f2937;
--ai-text-secondary: #6b7280;
/* Spacing */
--ai-spacing-xs: 0.25rem;
--ai-spacing-sm: 0.5rem;
--ai-spacing-md: 1rem;
--ai-spacing-lg: 1.5rem;
/* Typography */
--ai-font-family: system-ui, -apple-system, sans-serif;
--ai-font-mono: ui-monospace, monospace;
/* Border radius */
--ai-radius-sm: 0.25rem;
--ai-radius-md: 0.5rem;
--ai-radius-lg: 0.75rem;
}
// Compact variant
<Chat variant="compact" />
// Minimal variant
<Chat variant="minimal" />
// Bubble messages
<Message variant="bubble" />
All components follow WCAG 2.1 AA guidelines:
Check out the examples directory for:
AI-UI-Kit follows the same philosophy as shadcn/ui:
Contributions are welcome! Please read our contributing guide.
MIT © Josh Arsh
Built with ❤️ for the AI community. Inspired by shadcn/ui, Claude, ChatGPT, and v0.
FAQs
Beautiful, accessible React components for AI chat interfaces. Copy, paste, ship.
The npm package aichatkit receives a total of 3 weekly downloads. As such, aichatkit popularity was classified as not popular.
We found that aichatkit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.