
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ai-chatbot-react
Advanced tools
A modern, customizable feature-rich AI chatbot component for React applications with voice input, file upload, and Gemini AI integration
A modern, customizable feature-rich AI chatbot component for React applications with voice input, file upload, and Gemini AI integration.
npm install ai-chatbot-react
# or
yarn add ai-chatbot-react
# or
pnpm add ai-chatbot-react
Get your API key from Google AI Studio and add it to your environment variables:
NEXT_PUBLIC_GEMINI_API_KEY=your_api_key_here
import { Chatbot, ChatbotProvider } from 'ai-chatbot-react';
import 'ai-chatbot-react/styles';
function App() {
return (
<ChatbotProvider>
<div className="min-h-screen bg-gray-50">
<Chatbot
apiKey={process.env.NEXT_PUBLIC_GEMINI_API_KEY}
config={{
title: "AI Assistant",
placeholder: "Ask me anything...",
welcomeMessage: "Hello! How can I help you today?"
}}
/>
</div>
</ChatbotProvider>
);
}
export default App;
This package is fully compatible with Next.js projects. Here's how to set it up:
npm install ai-chatbot-react
Add the package's styles to your tailwind.config.js:
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./src/**/*.{js,ts,jsx,tsx,mdx}',
'./node_modules/ai-chatbot-react/dist/**/*.js'
],
theme: {
extend: {},
},
plugins: [],
}
In your main layout or page:
import 'ai-chatbot-react/styles';
'use client';
import { Chatbot, ChatbotProvider } from 'ai-chatbot-react';
export default function HomePage() {
return (
<ChatbotProvider>
<Chatbot
apiKey={process.env.NEXT_PUBLIC_GEMINI_API_KEY}
config={{
title: "My AI Assistant",
placeholder: "Type your message...",
welcomeMessage: "Hi! I'm here to help."
}}
/>
</ChatbotProvider>
);
}
import { Chatbot } from 'ai-chatbot-react';
const customConfig = {
title: "Custom AI Assistant",
placeholder: "Ask me anything...",
welcomeMessage: "Welcome! How can I assist you?",
theme: {
primary: "#3B82F6",
secondary: "#1F2937",
background: "#FFFFFF",
text: "#1F2937"
},
features: {
voiceInput: true,
fileUpload: true,
analytics: true,
markdown: true
}
};
<Chatbot apiKey={apiKey} config={customConfig} />
import {
ChatbotButton,
ChatbotWindow,
ChatbotMessages,
useChatbotStore
} from 'ai-chatbot-react';
function CustomChatbot() {
const { isOpen, toggleOpen } = useChatbotStore();
return (
<div>
<ChatbotButton onClick={toggleOpen} />
{isOpen && (
<ChatbotWindow>
<ChatbotMessages />
</ChatbotWindow>
)}
</div>
);
}
| Prop | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Your Gemini AI API key |
config | ChatbotConfig | No | Configuration object |
interface ChatbotConfig {
title?: string;
placeholder?: string;
welcomeMessage?: string;
theme?: {
primary?: string;
secondary?: string;
background?: string;
text?: string;
};
features?: {
voiceInput?: boolean;
fileUpload?: boolean;
analytics?: boolean;
markdown?: boolean;
};
}
MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
If you encounter any issues or have questions, please open an issue on GitHub.
FAQs
A modern, customizable feature-rich AI chatbot component for React applications with voice input, file upload, and Gemini AI integration
We found that ai-chatbot-react 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.