🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

usersnap-classic-component

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

usersnap-classic-component

An easy to use component to load the usersnap classic widget

1.0.3
latest
npm
Version published
Weekly downloads
11
175%
Maintainers
1
Weekly downloads
 
Created
Source

Usersnap Classic Component

Installation

npm install --save usersnap-classic-component

How To Use

First import this component where you want to use it

import UsersnapClassicLoader from "usersnap-classic-component"

Then just use it in your render method like this

<UsersnapClassicLoader apikey="YOUR-APIKEY" />

Props

PropDescriptionDefault value
apiKeyAPI Key of your classic project""
configCustom configuration for the widget{}
exposeAPIWhen true, the API will be exposed to window.Usersnapfalse

Please note that a valid apikey is required to load the Usersnap Classic Widget correctly. The apikey can be found in the settings of your Usersnap Classic Project.

Examples

import React, { Component } from "react";
import UsersnapClassicLoader from "usersnap-classic-component";

class App extends Component {
  render() {
    return (
        <UsersnapClassicLoader apiKey="YOUR-APIKEY" />
    );
  }
}

export default App;

Exposing the API

import React, { Component } from "react";
import UsersnapClassicLoader from "usersnap-classic-component";

class App extends Component {
  render() {
    return (
        <UsersnapClassicLoader apiKey="YOUR-APIKEY" exposeAPI={true}/>
    );
  }
}

export default App;

Now you can control the widget via the API and open it like so: window.Usersnap.open() For more information on how to use the API please have a look here: https://help.usersnap.com/docs/api-for-usersnap-classic-new

FAQs

Package last updated on 07 Nov 2019

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