Observed since 20 Oct, 18:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A fully customizable, draggable chatbot component built with React and Recoil for your next project.
10xAnswers is an easy-to-integrate, fully customizable, and draggable chatbot component built with React and Recoil. It allows you to add an intelligent chatbot to your project with minimal effort—no need to build one from scratch. Simply configure the prompt and provide the backend URL (or use our hosted service if you don’t want to build the backend yourself).
With 10xAnswers, you get both the frontend component and a backend solution, streamlining the process of adding a chatbot to your project. Just provide the URL and you're good to go—whether you want to build your own backend or use our hosted solution.
Write-up: How 10xAnswers works, by Rajveer Singh
You can see the 10xAnswers chatbot in action, customize its appearance, behavior, and features, and even get the exact code to integrate it into your own website!
Visit the demo and customization page at: https://10x-answers.vercel.app/ Try adjusting the settings to see how the chatbot reacts to different configurations. After customizing the chatbot, you can copy the generated code and implement it directly into your project to use the same customized bot on your website.
npm install 10xanswers
# or
yarn add 10xanswers
# or
pnpm add 10xanswers
import React from 'react';
import { ChatBot } from '10xanswers';
function App() {
return (
<ChatBot
backendUrl="https://ask-10x-questions.vercel.app/"
prompt="Act as an artist and answer questions in a creative and stylistic manner."
/>
);
}
export default App;
Important: The provided URL https://ask-10x-questions.vercel.app/ is a pre-configured backend that works seamlessly with the 10xAnswers component.
❌ 10xAnswers (v1.1.14 and earlier) is NOT compatible with React 19
This is due to its dependency on Recoil v0.7.7, which is built for React 18 and hasn't been updated to support React 19's internal changes.
Attempting to use 10xAnswers with React 19 may cause errors like:
Uncaught TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')
To avoid compatibility issues, use React 18.x with 10xAnswers.
If you've already set up your project with React 19, you can downgrade to React 18 by following these steps:
package.jsonUpdate the dependencies section as follows:
{
"dependencies": {
"10xanswers": "^1.1.14",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0"
}
}
💡 You can also use any other stable React 18 version, like
^18.3.1.
Install everything again using your package manager:
npm install
# or
yarn install
# or
pnpm install
I’m currently overhauling the state management solution, shifting away from Recoil to Zustand, which is fully compatible with React 19. Once complete, 10xAnswers will work seamlessly with the latest React release.
⭐ Want to help? I welcome any contributions toward this migration!
| Prop | Type | Default | Description |
|---|---|---|---|
backendUrl | string | - | Backend URL for chat processing, required |
geminiApi | string | - | Gemini API key for direct integration if no backend availaible(not recommended) |
title | string | "10xAnswers" | Chat window title |
draggable | boolean | false | Enable/disable dragging |
startOpen | boolean | false | Initial chat window state(open/colsed) |
| Prop | Type | Default | Description |
|---|---|---|---|
chatWindowStyle | object | {} | Inline styles for chat window |
chatBotIconStyle | object | {} | Inline styles for bot icon |
chatComponentStyle | object | {} | Inline styles for chat component |
<ChatBot
backendUrl="https://ask-10x-questions.vercel.app/"
title="100xQuestions"
stylizeTitle={{emphasized:"100x",normal:"Questions"}}//this field is optional, but recommended
botIcon="./logoImg2.jpg"
userIcon="./logoImg.jpg"
draggable={true}
x={500}
y={625}
prompt="You're and artisted turned developer, not respond accordingly"
description="AI-powered conversational assistant"
cta="Start Asking"
startOpen={true}
chatWindowStyle={{backgroundColor: #090909}}//if you want to change the background color, you can simply do it in the window
/>
| Prop Name | Type | Description |
|---|---|---|
chatWindowStyle | Object | Inline CSS for chat window styling. |
chatBotIconStyle | Object | Inline CSS for bot icon styling. |
chatComponentStyle | Object | Inline CSS for overall chat component styling. |
chatWindowClassName | String | Tailwind classes for chat window styling. |
chatBotIconClassName | String | Tailwind classes for bot icon styling. |
backendUrl | String | Required if no Gemini API is provided. URL for backend to process requests. |
title | String | Custom title for the chatbot window. |
botIcon | String | Path to the bot icon image. |
userIcon | String | Path to the user icon image. |
stylizeTitle | Object | Object with emphasized and normal strings to style the title. |
prompt | String | Custom prompt for the chatbot. Use "none" for no prompting. |
geminiApi | String | Required if no backendUrl is provided. |
theme | String | Theme for the chatbot (currently not implemented). |
draggable | Boolean | Enable or disable draggable functionality. |
x | Number | Initial x-position for draggable mode. |
y | Number | Initial y-position for draggable mode. |
description | String | Description text for the chatbot. |
cta | String | Call-to-action text for the chatbot button. |
startOpen | Boolean | Whether the chatbot window starts open (true) or closed (false). |
prompt: If a custom prompt is provided, it will be sent along with the user question.prompt: If prompt is set to "none", only the user question with no prompt is sent to the ai model- not recommended.Default Prompt:
If no prompt is provided, default prompt will be sent to the model along with the questions asked by client
You are 10xAnswers, an intelligent and highly versatile chatbot. Your purpose is to assist users with precision, accuracy, and clarity...
Custom Prompt: You can specify your custom prompts here, every question of client will be sentto model along with this prompt
User is sending a custom prompt about behavior. Prompt: ${prompt}. Question: ${question}. History: ${chatHistory}.
If you don't have a working backend you can directly use Google's Gemini API and pass it in the props, and send requests to the gemini directly from frontend. Not recommended as this exposes the api key to the users of your web app.
POST requests are sent to backend with the following payload:
{
"method": "POST",
"body": {
"contents": [{
"parts": [{"text": "User question"}]
}]
}
}
Development Caution:
jsx <ChatBot chatComponentStyle={{zIndex:1}}/>Rajveer Singh
Found an issue? Open a GitHub Issue
Enjoying 10xAnswers? Consider starring the repository! ⭐
Start building smarter projects with 10xAnswers today! 🚀
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.35 | 2 Dec 2024 | 31 | |
| 1.0.34 | 1 Dec 2024 | 31 | |
| 1.0.33 | 1 Dec 2024 | 31 | |
| 1.0.32 | 1 Dec 2024 | 31 | |
| 1.0.31 | 1 Dec 2024 | 31 | |
| 1.0.30 | 1 Dec 2024 | 31 | |
| 1.0.29 | 1 Dec 2024 | 31 | |
| 1.0.28 | 1 Dec 2024 | 31 | |
| 1.0.27 | 1 Dec 2024 | 31 | |
| 1.0.26 | 1 Dec 2024 | 31 | |
| 1.0.25 | 1 Dec 2024 | 31 | |
| 1.0.24 | 1 Dec 2024 | 31 | |
| 1.0.23 | 1 Dec 2024 | 31 | |
| 1.0.22 | 1 Dec 2024 | 31 | |
| 1.0.21 | 1 Dec 2024 | 31 | |
| 1.0.20 | 1 Dec 2024 | 31 | |
| 1.0.19 | 1 Dec 2024 | 31 | |
| 1.0.18 | 1 Dec 2024 | 31 | |
| 1.0.17 | 1 Dec 2024 | 31 | |
| 1.0.16 | 1 Dec 2024 | 31 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 18:02 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:9a968c46755dbdd696a51c705fa5b8c16e4583608a09fd89a8645919876fd18d