x-widget-react
v1.0.4
Published
React component library designed to seamlessly integrate X Widget into your React applications.
Downloads
10
Readme
x-widget-react
x-widget-react
is a React component library designed to seamlessly integrate X Widget into your React applications. It allows you to embed a customizable X Widget with a simple component, providing your application with enhanced functionality tailored to your needs.
Installation
To install the package, run the following command in your project directory:
npm i x-widget-react
This will add x-widget-react
to your project's dependencies.
Usage
After installation, you can use x-widget-react
in your project by importing the XWidget
component and embedding it into your application. Here's a quick start guide:
- Import
XWidget
in the root of your React project:
import { XWidget } from 'x-widget-react'
- Use the
XWidget
component in your application, passing theworkspaceId
as a prop:
<XWidget workspaceId={'<workspace_id>'} />
Ensure that you replace <workspace_id>
with your actual workspace ID.
Props
workspaceId
(required): A unique identifier for your workspace, used to initialise the X Widget.