Skip to main content
userTourKit
@tour-kit/surveysComponents

Components

Pre-styled display and question components: five survey containers and four accessible question input types with CVA variant support

domidex01Published

Pre-built, accessible survey components. Display components control visibility based on survey state. Question components are controlled inputs that call back with typed values.

Display components

Question components

Composition pattern

Display components render their content through children. Compose question components inside:

import { SurveyModal, QuestionRating, SurveyProgress } from '@tour-kit/surveys';

<SurveyModal surveyId="nps-q1">
  <SurveyProgress current={1} total={2} />
  <QuestionRating
    id="score"
    label="How likely to recommend us (0–10)?"
    min={0}
    max={10}
    lowLabel="Not at all"
    highLabel="Extremely likely"
    onChange={(value) => survey.answer('score', value)}
  />
</SurveyModal>

Styling

All components forward className and accept standard HTML attributes via rest props. Variants are defined with CVA — import the variant functions to generate class names in custom implementations:

import {
  ratingOptionVariants,
  textInputVariants,
  selectOptionVariants,
  booleanOptionVariants,
  progressBarVariants,
} from '@tour-kit/surveys';

Turn-key recipes

For ready-made NPS / CSAT / CES modals with pre-wired scoring, see turn-key modals.

Headless alternative

If you need full control over markup and styling, use the headless components instead.

Free & open source

Ship onboarding, not config.

npm i @tour-kit/core is MIT and free. The Pro packages work unlicensed too — a one-time $99 license removes the production watermark when you ship.

MIT-licensed — no signup, no credit card. Pay once, only when you ship.