@uservane/react: SurveyDefinition
Type Alias: SurveyDefinition
Section titled “Type Alias: SurveyDefinition”SurveyDefinition =
object
Defined in: browser/dist/index.d.ts:24
@uservane/react - thin React wrapper over @uservane/browser.
Does not reimplement the widget or show-decision; it only wires init, identify, and survey through a provider, hook, and error boundary.
Next.js App Router: this module is a Client Component ("use client").
Import UserVaneProvider from a client boundary (or a file that already
has "use client"). No window access at import time.
import { UserVaneProvider, useUserVane } from "@uservane/react";
<UserVaneProvider apiKey="uv_pk_live_..."> <App /></UserVaneProvider>
// inside a child:const { survey, identify } = useUserVane();survey("nps-q1");Properties
Section titled “Properties”corner?
Section titled “corner?”
optionalcorner?:Corner
Defined in: browser/dist/index.d.ts:32
delayMs?
Section titled “delayMs?”
optionaldelayMs?:number
Defined in: browser/dist/index.d.ts:38
Fixed delay (ms) after page-idle before auto appearance. Fires once. Not idle-detection hunting. Default 8000.
endLabels?
Section titled “endLabels?”
optionalendLabels?:object
Defined in: browser/dist/index.d.ts:44
high:
string
low:
string
followUpQuestion?
Section titled “followUpQuestion?”
optionalfollowUpQuestion?:string
Defined in: browser/dist/index.d.ts:30
Optional free-text follow-up. Always skippable.
id:
string
Defined in: browser/dist/index.d.ts:25
presentation
Section titled “presentation”presentation:
Presentation
Defined in: browser/dist/index.d.ts:31
question
Section titled “question”question:
string
Defined in: browser/dist/index.d.ts:28
samplePercent?
Section titled “samplePercent?”
optionalsamplePercent?:number
Defined in: browser/dist/index.d.ts:40
Deterministic audience sampling 0–100. Default 100.
showBadge?
Section titled “showBadge?”
optionalshowBadge?:boolean
Defined in: browser/dist/index.d.ts:43
Free plan shows a small “Powered by UserVane” link.
slug:
string
Defined in: browser/dist/index.d.ts:26
targeting?
Section titled “targeting?”
optionaltargeting?:TraitPredicate[]
Defined in: browser/dist/index.d.ts:41
trigger
Section titled “trigger”trigger:
Trigger
Defined in: browser/dist/index.d.ts:33
type:
SurveyType
Defined in: browser/dist/index.d.ts:27