@ftrack/web-widget
TypeScript icon, indicating that this package has built-in type declarations

1.6.5 • Public • Published

ftrack web widget

This small library encapsulates some logic which can be used to build custom dashboard widgets for ftrack.

Installation

We recommend installing and bundling with NPM:

npm install @ftrack/web-widget

Usage

To use the library, define two functions onWidgetLoad and onWidgetUpdate and initialize the library once the document is ready:

import { initialize } from "@ftrack/web-widget";

/** Initialize widget once DOM has loaded. */
window.addEventListener("DOMContentLoaded", function onDomContentLoaded() {
  initialize({
    onWidgetLoad: onWidgetLoad,
    onWidgetUpdate: onWidgetUpdate,
  });
});

If used as an UMD module, the library exposes ftrackWidget on the global (window) object.

For a more complete example, see ftrack JavaScript API: Basic Widget Example

More information on the API used is available in the documentation Creating a custom widget with React.

Readme

Keywords

none

Package Sidebar

Install

npm i @ftrack/web-widget

Homepage

ftrack.com

Weekly Downloads

261

Version

1.6.5

License

Apache-2.0

Unpacked Size

48.9 kB

Total Files

8

Last publish

Collaborators

  • callin
  • lucaas