1.0.11 • Published 1 year ago

@fastn-widget/react-dev v1.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@fastn-ai/widget-react

A React component library for easily integrating and embedding Fastn widgets into your application.

Installation

npm install @fastn-ai/widget-react

Usage

import React from 'react';
import FastnWidget from '@fastn-ai/widget-react';

const Component = () => {
  const authToken = useAuth(); // Your authentication logic

  return (
    <FastnWidget
      projectId="example-project-id"
      authToken={authToken}
      tenantId="example-tenant-id"
      apiKey="example-api-key"
      theme="light"
      env="LIVE"
      style={{
        minHeight: '800px', // Set the minimum height of the widget
      }}
    />
  );
};

Props

Prop NameTypeDescription
projectIdstringThe ID of the project whose widget you want to embed.
authTokenstringThe authentication token used to authenticate your application users.
tenantIdstringThe ID of the tenant (e.g., user, organization, etc.) (optional).
apiKeystringThe API key to use for executing flows (optional).
themestringThe theme of the widget ("light" or "dark") (optional).
envstringThe environment of the widget ("LIVE" or other values) (optional).
styleobjectThe style object to apply to the widget (optional).
1.0.11

1 year ago

1.0.10

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago