1.6.0 • Published 4 months ago

@nepflow/integration-widget v1.6.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 months ago

Integration Widget

The widget allows your users to explore 6,000+ Zapier integrations right inside your app.

Learn more about the widget on our website: nepflow.dev

Production Deployment @nepflow/integration-widget.svg License

Get startedLive DemoBuild WidgetDocumentationNPM package

Installation

You can use the online builder to customize the widget and get the installation code.

Node.js package

Install the package via NPM or Yarn

npm install @nepflow/integration-widget --save

Import module in your application

import NepflowIntegrationWidget from '@nepflow/integration-widget';

Load from CDN

You can load specific version of package from jsDelivr CDN.

<script src="https://cdn.jsdelivr.net/npm/@nepflow/integration-widget@1/dist/bundle.js"></script>

Configuration

Add element

Create an element that should contain the widget

<div id="integration-widget"></div>

Initialization

Basic usage:

const widget = new NepflowIntegrationWidget(
  'integration-widget', // Element ID
  {
    backgroundColor: '#f5f5f5',
    cardColor: '#fff',
    cardBorderColor: '#fff',
    innerSpace: 24,
    autoVerticalResize: true,
    onCardClick: function(id) {
      alert(id + ' clicked!')
    }
  }
);

If your app is integrated with Zapier, your users can see integration guides and Zapier templates:

const widget = new NepflowIntegrationWidget(
  'integration-widget', // Element ID
  {
    zapierAppId: '<ZAPIER APP SLUG>', // Your Zapier app key
    backgroundColor: '#f5f5f5',
    cardColor: '#fff',
    cardBorderColor: '#fff',
    innerSpace: 24,
    autoVerticalResize: true,
    onCardClick: function(id) {
      console.log('card clicked:', id)
    }
  }
);

You can use customCards parameter to show your native integrations or replacing existing Zapier apps:

const widget = new NepflowIntegrationWidget(
  'integration-widget', // Element ID
  {
    zapierAppId: '<ZAPIER APP SLUG>', // Your Zapier app key
    backgroundColor: '#f5f5f5',
    cardColor: '#fff',
    cardBorderColor: '#fff',
    innerSpace: 24,
    autoVerticalResize: true,
    customCards: [
      // Showing a custom integration in the catalog
      { 
        id: 'custom_integration', 
        name: 'Custom Integration', 
        iconURL: 'https://example.com/foobar.png' 
      },

      // Replacing an existing Zapier app in the catalog
      {
        id: 'gmail', 
        name: 'Gmail', 
        iconURL: 'https://example.com/gmail.png',
        replacedZapierAppId: 'gmail'
      },
    ],
    onCardClick: function(id) {
      alert(id + ' clicked!')
    }
  }
);

Parameters

You can pass any of these parameters for your widget:

ParameterDescriptionTypeDefault
zapierAppIdYour Zapier app ID or slugstring#f5f5f5
backgroundColorThe widget's background color (hex)string#ffffff
cardColorThe color for the card components (hex)string#ffffff
cardBorderColorCard component border color (hex)string#ffffff
innerSpaceThe padding inside the widget (px)number24
autoVerticalResizeEnables automatic vertical resizing for the iframebooleanfalse
onCardClickCalled when card is clicked(id: string) => void-
customIntegrationsArray of custom or native integrations{ id: string; name: string; iconURL: string; replacedZapierAppId: string; }[][]

Technical Support or Questions

If you have questions or need help integrating the editor please contact us instead of opening an issue.

License

Apache License 2.0

1.6.0

4 months ago

1.5.0

4 months ago

1.4.0

5 months ago

1.3.2

5 months ago

1.3.1

5 months ago

1.3.0

5 months ago

1.2.2

5 months ago

1.2.1

5 months ago

1.2.0

5 months ago

1.1.0

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago