1.0.8 • Published 4 months ago

web-frame-lib v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

How to use?

  • Install web-frame-lib package from npm

    npm i web-frame-lib
  • Adding to your Project

    import { useEffect } from 'react';
    import { initWebFrame } from 'web-frame-lib';
    
    const App = () => {
    
        //  this will mount it after page render
        useEffect(()=>{
            initWebFrame({
                url: 'https://your-website.com',
            })
    
            // other options available below in Readme
        },[]);
    
        return(
            <>Hello</>
        )
    }
  • That's all your chatbot, message service or whatever you ahve done is now availabe in your app with just a click of button.

Options

  • Edit config object

    initWebFrame({
        url: 'https://your-website.com',
        config: {
            activatorText: `Chat With US`, //default
            closeText: `Close`, //default
            color: `#000`,  //default
            backgroundColor: `#fff`,    //default
            wfl_css: wfl_css,  //default
            css: ``,   // add custom css triggering classes inside
        },
        executeAfterWfl: (config, button) => {
            //  this will execute within scope of this script so that you can perform additional actions
            console.log('executeAfterWfl', config, button)
        },    
    })

Styling

iddescription
wfl-cta-buttonPrimary Triggering button
wfl-crossCross button on mobile ui (ful screen)
wfl-frameiframe container
  • to apply additional customization you can pass a string of all css inside config object

Package Developed by Pushkar Yadav. For Support please contact here

1.0.8

4 months ago

1.0.7

4 months ago

1.0.6

4 months ago

1.0.5

4 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago