# The Function

```javascript
htmlWidget(input: String, debug: Boolean, addons: Object): Promise<ListWidget>
```

Provide the HTML string as the input parameter. The debug parameter is optional and when `true` logs the compiled code. The `addon` parameter is optional and allows for add-ons (see [Add-ons](https://normal-tangerine8609.gitbook.io/html-widget/add-ons/add-ons) for more information). A promise is returned, meaning that you will need an `await` to access the returned widget.

```javascript
let widget = await htmlWidget(`
<widget>
  <text>Hello, World!</text>
</widget>
`)
widget.presentSmall()
```
