<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[`Notice`](Notice) › [`(constructor)`](Notice/(constructor).md)
## Notice.(constructor)
Constructs a new instance of the `Notice` class
**Signature:**
```typescript
constructor(message: string | DocumentFragment, duration?: number);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| <code>message</code> | <code>string | </code><code>DocumentFragment</code> | The message to be displayed, can either be a simple string or a |
| <code>duration</code> | <code>number</code> | _(Optional)_ Time in milliseconds to show the notice for. If this is 0, the Notice will stay visible until the user manually dismisses it. |