x-widget-react
v1.0.4
Published
React component library designed to seamlessly integrate X Widget into your React applications.
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-reactThis 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
XWidgetin the root of your React project:
import { XWidget } from 'x-widget-react'- Use the
XWidgetcomponent in your application, passing theworkspaceIdas 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.
