Skip to content

@uservane/react: 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");

optional corner?: Corner

Defined in: browser/dist/index.d.ts:32


optional delayMs?: 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.


optional endLabels?: object

Defined in: browser/dist/index.d.ts:44

high: string

low: string


optional followUpQuestion?: 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: Presentation

Defined in: browser/dist/index.d.ts:31


question: string

Defined in: browser/dist/index.d.ts:28


optional samplePercent?: number

Defined in: browser/dist/index.d.ts:40

Deterministic audience sampling 0–100. Default 100.


optional showBadge?: 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


optional targeting?: TraitPredicate[]

Defined in: browser/dist/index.d.ts:41


trigger: Trigger

Defined in: browser/dist/index.d.ts:33


type: SurveyType

Defined in: browser/dist/index.d.ts:27