New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@formsort/react-embed

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formsort/react-embed

Embed formsort flows in react components

  • 2.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.6K
decreased by-26.85%
Maintainers
3
Weekly downloads
 
Created
Source

@formsort/react-embed

Embed Formsort flows within react components

Installation

Add @formsort/react-embed to your project by executing npm install @formsort/react-embed or yarn add @formsort/react-embed.

Usage

Here's an example of basic usage:

import React from 'react';
import EmbedFlow from '@formsort/react-embed';

const EmbedFlowExample: React.FunctionComponent = () => (
  <div>
    <EmbedFlow
      clientLabel="formsort"
      flowLabel="onboarding"
      variantLabel="main"
      embedConfig={{
        style: {
          width: '100%',
          height: '100%',
        },
      }}
    />
  </div>
);
Events

You can add event listeners to flows like Flowloaded, redirect etc. See all event listeners

Props
Prop nameDescriptionRequiredExample values
clientLabelclient nameyesformsort
flowLabelflow nameyesonboarding
variantLabelvariant namenomain
responderUuidresponder uuid to load existing answers fornoe4923baa-dc2d-4555-813c-a166952292fa
formsortEnvformsort integrations environment label, if not using productionnostaging
queryParamsadditional query params, to pre-populate answers in the formno[['name', 'Olivia']], ['age', '3']]
embedConfigconfig passed to the underlying FormsortWebEmbedno{ style: { height: '100%' } }
onFlowLoadedevent listenerno() => { console.log('flow loaded') }
onFlowClosedevent listenerno() => { console.log('flow closed') }
onFlowFinalizedevent listenerno() => { console.log('flow finalized') }
onStepLoadedevent listenerno() => { console.log('step loaded') }
onStepCompletedevent listenerno() => { console.log('step loaded') }
onRedirectevent listenerno(url: string) => { console.log('redirecting to:', url) }

Testing

npm run test

Publishing

npm publish

Keywords

FAQs

Package last updated on 30 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc