+ Free live chat widget, loaded through a typed proxy, reactive state, and event listeners. +
+
+ Before Load Widget this writes Tawk_API.visitor and Tawk picks it up.
+ Afterwards the same call warns and drops the data, which is what
+ setAttributes() is for. Try it on both sides to see each path.
+
const { proxy, status, chatStatus, isHidden, unreadCount } = useScriptTawkTo({
+ propertyId: 'your-property-id',
+ widgetId: 'your-widget-id',
+})
+
+proxy.maximize()
+ const { getStatus, isChatHidden, setVisitor } = useScriptTawkTo({ ... })
+
+// proxy.getStatus() always returns undefined (proxy is fire-and-forget);
+// these call straight through to window.Tawk_API instead
+getStatus() // => 'online' | 'away' | 'offline' | undefined
+isChatHidden() // => boolean
+
+setVisitor({ name: 'Jane Doe', email: 'jane@example.com' })
+ const { onChatStarted, onChatEnded, onUnreadCountChanged } = useScriptTawkTo({ ... })
+
+const stop = onChatStarted(() => console.log('chat started'))
+onUnmounted(stop)
+