survey-vue3-ui

survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.
525,880 4,915
Install
npm install survey-vue3-ui
Latest Version:3.2.3
Vue:3
License:MIT
Last Updated:Oct 27, 2026
Links: GitHub  ·  npm
Maintainer: tsv2013
readme_overview_library

SurveyJS Vue.js Form Library (Vue 3)

Build Status Software License Tested with Playwright Open Issues Closed Issues

SurveyJS Vue.js Form Library is a free and open-source Vue 3 component library for rendering dynamic, JSON-driven forms and surveys in Vue 3 applications.

The survey-vue3-ui package integrates SurveyJS Form Library with Vue 3, renders forms defined with SurveyJS JSON form definitions, and collects user responses in the browser. It works together with the framework-independent survey-core package, which provides the form model and handles form structure, validation, conditional logic, calculations, navigation, localization, and other core behavior. Installing survey-vue3-ui brings survey-core with it — you build a model from JSON with survey-core and pass it to this package's SurveyComponent to display.

Use SurveyJS Vue.js Form Library to build multi-step forms, surveys, quizzes, assessments, calculator forms, and other data-entry tools. Form definitions and submitted responses can be stored and processed in your own backend and database.

You can create form definitions manually, generate them with AI, or build them visually with SurveyJS Creator, an embeddable drag-and-drop form builder.

Installation

npm install survey-vue3-ui

This package targets Vue 3. For Vue 2, use the survey-vue-ui package.

Usage

<script setup lang="ts">
import { Model } from 'survey-core';
import { SurveyComponent } from 'survey-vue3-ui';
import 'survey-core/survey-core.css';

const surveyJson = {
  elements: [
    { name: 'firstName', title: 'Enter your first name:', type: 'text' },
    { name: 'satisfaction', title: 'How satisfied are you?', type: 'rating' }
  ]
};

const survey = new Model(surveyJson);
survey.onComplete.add((sender) => {
  console.log(JSON.stringify(sender.data, null, 2));
});
</script>

<template>
  <SurveyComponent :model="survey" />
</template>

The code above registers SurveyComponent locally. To register it globally, install surveyPlugin in main.ts instead:

// main.ts
import { createApp } from 'vue';
import { surveyPlugin } from 'survey-vue3-ui';
import App from './App.vue';

createApp(App).use(surveyPlugin).mount('#app');

survey-core/survey-core.css applies the Default theme. For other predefined themes and CSS-variable customization, refer to Themes & Styles.

Theme Adapters

A theme adapter maps an existing design system's CSS variables onto SurveyJS design tokens, so an embedded survey inherits the look of the host application. Adapters ship with survey-core as plain CSS — import one after the base style sheet:

import 'survey-core/survey-core.css';
import 'survey-core/themes/adapters/bootstrap-default.css';

Adapters are available for Bootstrap (plus Bootswatch variants), Material UI, shadcn/ui, and Tailwind CSS v4 (tailwind4.css), with matching icon sets (survey-core/themes/adapters/icons/lucide, .../icons/mui). See Theme Adapters.

Key Features

Dynamic Forms and Surveys

  • Render dynamic JSON-driven forms and surveys in Vue 3 applications
  • Multi-step forms, quizzes, assessments, calculator forms, and survey pop-ups
  • Conditional visibility, branching, calculations, and expression-based logic
  • Input validation, save-and-resume workflows, and dynamic content

Form Controls

  • 20+ built-in question and input types
  • Dynamic panels and repeating question groups
  • Custom question types and reusable components
  • Electronic signature, image capture, file upload, matrices, and other advanced controls

Vue 3 Integration

  • Vue 3 components
  • TypeScript support
  • Framework-independent form model through survey-core

Data and Backend Integration

Appearance and Localization

Package Purpose
survey-core Platform-independent survey model (installed automatically)
survey-react-ui React renderer
survey-angular-ui Angular renderer
survey-js-ui HTML/CSS/JavaScript renderer

Resources

For AI coding agents: https://surveyjs.io/llms.txt indexes the documentation. Any documentation page is also available as raw Markdown — append .md to its URL, for example https://surveyjs.io/form-library/documentation/get-started-vue.md.

SurveyJS Ecosystem

Product Purpose License
Form Library Render dynamic forms from JSON (this package) MIT
Survey Creator Drag-and-drop form builder UI Commercial
Dashboard Visualize and analyze collected results Commercial
PDF Generator Render forms and responses as PDF Commercial
AI Form Response Extractor Extract responses from paper forms, PDFs, and images into a SurveyJS schema (ai-form-response-extractor) MIT

Build from Source

Requires Node.js 20 or later — CI builds on Node 20.x and 22.x. This monorepo does not use npm workspaces: each package installs independently, but a root install is still required for the shared tooling (linting, Playwright).

  1. Clone the repo and install shared dependencies

    git clone https://github.com/surveyjs/survey-library.git
    cd survey-library
    npm install
    
  2. Build survey-core first

    This package resolves survey-core from ../survey-core/build, so the model must be built before this library can be built or tested. Follow Build from sources in the survey-core README.

  3. Install dependencies and build this library

    cd packages/survey-vue3-ui
    npm install
    npm run build
    

    Build output goes to the build directory. npm run build runs a Vite build and emits type declarations. Use npm run watch:dev while developing.

  4. Run a test application

    npm run dev
    

    This runs a local Vite server at http://localhost:5173/.

  5. Run unit tests

    Unit tests use Vitest in a jsdom environment and live in tests. The markup snapshot tests are generated into tests/shards by gen-shards.js before each run, so npm run test is the entry point rather than a bare vitest.

    npm run test                        # whole suite
    npm run test:watch                  # watch mode
    npx vitest run tests/base.spec.ts   # a single file
    npx vitest run -t "test name"       # tests matching a substring
    
  6. Run end-to-end tests

    E2E, visual-regression, and accessibility tests are Playwright suites. Vue serves a production build of the example app, so build it first. Do not start an HTTP server yourself — the Playwright config runs serve:example:prod itself.

    npm run build:example:prod              # produces example/dist
    npm run e2e:ci                          # e2e
    npm run e2e:ci -- --grep "TestName"     # a single test
    npm run scr:ci                          # visual regression
    npm run accessibility-tests:ci          # accessibility
    

Licensing

SurveyJS Form Library is distributed under the MIT license.

Related Packages

survey-vue-ui

survey.js is a JavaScript Survey Library. It is a modern way to add a survey to...

55,237 4,911
survey-vue

survey.js is a JavaScript Survey Library. It is a modern way to add a survey to...

419,342 4,911
bootstrap-vue-top

A frontend framework based on Bootstrap & Vue.

2,617
@ow3/hello-world-vue

Your Vue component library description

1,618 636

Version History

Version Released Vue License
3.2.3 ^3.4.0 MIT
3.2.2 ^3.4.0 MIT
3.2.1 ^3.4.0 MIT
3.2.0 ^3.4.0 MIT
3.1.2 ^3.4.0 MIT
Pre-releases (21)
Version Released Vue License
3.0.0-beta.9 ^3.4.0 MIT
3.0.0-beta.8 ^3.4.0 MIT
3.0.0-beta.7 ^3.4.0 MIT
3.0.0-beta.6 ^3.4.0 MIT
3.0.0-beta.5 ^3.4.0 MIT