shutterstock-ui-search-widget-js

2.0.6 • Public • Published

szhutterstock-ui-search-widget

Shutterstock UI Search Widget JavaScript Library

Version 2.0.6

This is a robust and easy-to-integrate JavaScript widget for Shutterstock.

Installation and Usage

npm install shutterstock-widget import ShutterstockWidget from "@ShutterstockWidget"

Example on window load:

const searchPage = {
    name: 'searchPage',
    component: ShutterstockWidget.components.SearchPage,
    props: {
        mediaType: 'images',
        title: 'Shutterstock UI Search Widget',
        subtitle: '',
        dynamicTitle: true,
        dynamicSubtitle: true,
        showMore: true,
        showSearchBar: true,
        onItemClick: (e, item) => {
            e.preventDefault();
            console.log(item);
        }
    }
};

const widget = new ShutterstockWidget({
    container: document.getElementById('widget-container'),
    key: 'YOURKEY',
    pages: [searchPage]
});

widget.getPage('searchPage').search()

Readme

Keywords

Package Sidebar

Install

npm i shutterstock-ui-search-widget-js

Weekly Downloads

1

Version

2.0.6

License

Shutterstock Licence

Unpacked Size

640 kB

Total Files

4

Last publish

Collaborators

  • darkwolf66