$ npm install @flixier/sdk
-> if you're using NPM
or
$ yarn add @flixier/sdk
-> if you're using YARN
Then just import it and get going :)
import FlixierSDK from '@flixier/sdk';
You can also add it directly in your HTML page via a script
tag:
<script src="[path-to-script]/FlixierSDK.[version].js"></script>
which will create a global object called FlixierSDK.
A function used to diynamically insert a Flixier button on your page. Clicking this button will open Flixier homepage.
Type: Function(rootElement, config?)
The dynamically generated button will be inserted in this element;
Type: DOMElement
Aditional configuration options for the style and behaviour of the button.
Type: Object
Default:
{
theme: 'blue', // styling theme. Available options: 'blue' | 'white'
popup: true // whether or not to open it in a new window, as a pop-up
}
Returns a function you can use to remove the button from the page.
import 'FlixierSDK.[version].js'
let removeFlixierBtn = window.FlixierSDK.button(document.body, {
theme: 'white',
popup: false
});
// Later in the progam when you no longer need it
removeFlixierBtn()
Made with ❤ by Flixier team