The module is written in TypeScript and provides full type definitions out of the box. This ensures that you get autocompletion and type checking in your nuxt.config.ts and Vue components.
If you need to use the configuration interface manually (for example, when typing a custom wrapper), you can import it directly from the module:
import type { TawkToConfig } from 'nuxt-tawk-to/types'
The configuration object is simple and strict. Here is the definition:
| Option | Type | Description |
|---|---|---|
propertyId | string | Required. Your Tawk.to property ID. |
widgetId | string | Required. Your Tawk.to widget ID. |
embedId | string | Optional embed ID for advanced embedding scenarios. |
basePath | string | Base path for widget route if needed (used with routing or path config). |
autoStart | boolean | Whether the widget should automatically load. |
defineNuxtConfig, these types are automatically mapped to the tawkTo key, so you don't usually need to import them manually.