biel-react
v0.1.0
Published
Biel wrapper for React
Downloads
13
Readme
biel-react
Ask AI chatbot for React applications.
Prerequisites
Before proceeding, ensure you have:
- A Biel.ai account.
- A project set up in your Biel.ai dashboard.
- A React application with Node.js installed.
Installation
Open your terminal or command prompt.
Navigate to your project's root directory:
cd path/to/your/project
Replace
path/to/your/project
with the actual path to your project directory.Install Biel.ai by running:
npm install biel-react
INFO: If you're using yarn, use
yarn add biel-react
instead.In the main component where you want the chatbot to appear (commonly
src/App.js
), import and embed the Biel.ai button:import React, { useEffect } from 'react'; import { BielButton } from 'biel-react'; import { defineCustomElements } from 'biel-search/loader'; import 'biel-search/dist/biel-search/biel-search.css'; function App() { useEffect(() => { if (typeof window !== 'undefined') { defineCustomElements(window); } }, []); return ( <div className="App"> {/* Other components and content */} <BielButton project="<YOUR_PROJECT_ID>" button-position="bottom-right" modal-position="bottom-right" button-style="light">Ask AI</BielButton> </div> ); } export default App;
Replace
<YOUR_PROJECT_ID>
with your project's ID from the Biel.ai dashboard.After compiling your application, the chatbot should be visible and functional on your site.
Configuration
For further customization and to explore additional features, refer to the Configuration section.
Support
Need assistance? Contact us for help.
License
Copyright (c) 2024 Biel.ai
Licensed under the MIT License.