Chat Provider
The provider creates a chat context and is the cornerstone for interacting with BotStacks data.
Component
The BotStacksChatProvider
component must wrap all chat related components. It is used to setup the store and API.
Theming
The UI Kit allows you to define both a light and a dark theme. You can pass both to the themes prop and utilize the
darkMode
prop to toggle which theme is used. If you do not pass any themes to the theme prop, the
default themes will be used.
Default Themes
The default themes are defined below:
Dark mode
If you wish to use only dark theme, you can define it as such:
useChat
Any component wrapped by the BotStacksChatProvider
component has access to the store. To create a reference
in your component, you can use the useChat
function. For more details on the store and how to use it, check out
the SDK documentation.
Import
Usage
Was this page helpful?