gentiq 0.9.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -358,6 +358,48 @@ function MyWelcomeScreen() {
358
358
  }
359
359
  ```
360
360
 
361
+ ## Typing-Effect Subtitle
362
+
363
+ Instead of the static subtitle and clickable suggestion bubbles, you can show a
364
+ rotating subtitle that types itself out, cycling through any number of messages.
365
+ Set `welcome.typingPrompts` to a string array, or to a function that receives the
366
+ authenticated user so the messages can be conditioned on user info. When set, this
367
+ replaces both the static `subtitle` and the `prompts` suggestion bubbles.
368
+
369
+ ```tsx
370
+ // Static list
371
+ <GentiqProvider
372
+ welcome={{
373
+ greeting: 'Welcome back',
374
+ typingPrompts: [
375
+ 'Ask me anything…',
376
+ 'Summarize a document',
377
+ 'Draft an email',
378
+ ],
379
+ }}
380
+ >
381
+ <ChatUI />
382
+ </GentiqProvider>
383
+
384
+ // Conditioned on the authenticated user
385
+ <GentiqProvider
386
+ welcome={{
387
+ greeting: 'Welcome back',
388
+ typingPrompts: ({ firstName }) =>
389
+ firstName
390
+ ? [`Ask me anything, ${firstName}…`, 'Summarize a document', 'Draft an email']
391
+ : ['Ask me anything…', 'Summarize a document', 'Draft an email'],
392
+ }}
393
+ >
394
+ <ChatUI />
395
+ </GentiqProvider>
396
+ ```
397
+
398
+ The function receives the same context as the personalized `greeting`
399
+ (`{ user, firstName, isLoading, t }`). The typewriter respects the user's
400
+ `prefers-reduced-motion` setting, swapping whole messages instead of animating
401
+ each character when reduced motion is requested.
402
+
361
403
  ---
362
404
 
363
405
  ## 📄 License