# Workgrid Widgets - Stream

## Usage

This package is published to [npm](https://npmjs.com), and can be imported via cdn ([ESM>CDN](https://esm.sh), [UNPKG](https://unpkg.com), [jsDelivr](https://jsdelivr.com)).

The `target` is required and specifies the dom element in which the component should be rendered.

The `getToken` method is required and must return a Workgrid User Auth Token (it may be synchronous or asynchronous).

```html
<script type="module">
  import stream from '@workgrid-widgets/stream'

  stream({
    target: document.querySelector('#container'),
    getToken: () => { ... },
  })
</script>
```
