Essentials

TypeScript

Fully typed configuration for a better developer experience.

Type Safety

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.

Importing Types

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'

Interface Definition

The configuration object is simple and strict. Here is the definition:

OptionTypeDescription
propertyIdstringRequired. Your Tawk.to property ID.
widgetIdstringRequired. Your Tawk.to widget ID.
embedIdstringOptional embed ID for advanced embedding scenarios.
basePathstringBase path for widget route if needed (used with routing or path config).
autoStartbooleanWhether the widget should automatically load.
When using defineNuxtConfig, these types are automatically mapped to the tawkTo key, so you don't usually need to import them manually.