explaingit

surveyjs/survey-library

4,743TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

SurveyJS is a free JavaScript library that turns a JSON description of your questions into a fully working form, survey, or quiz in any web framework, your data, your server, no limits.

Mindmap

mindmap
  root((repo))
    What it does
      Render forms from JSON
      Surveys and quizzes
      Conditional logic
    Frameworks
      React and Angular
      Vue and jQuery
      Plain HTML JS
    Form Features
      20+ input types
      Multi-page forms
      Auto-save and validation
    Data and Locale
      Your own server
      50+ languages
      Right-to-left support
    Ecosystem
      Survey Creator builder
      Dashboard component
      PDF export tool
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a multi-page survey or questionnaire to a React or Vue app by pointing the library at a JSON schema, no custom form code needed.

USE CASE 2

Build a quiz with automatic scoring and conditional questions that show or hide based on earlier answers.

USE CASE 3

Collect form submissions entirely on your own server with no third-party data storage or submission limits.

USE CASE 4

Support international users by enabling one of the 50+ built-in community translations and right-to-left layouts.

Tech stack

TypeScriptJavaScriptReactAngularVuejQuery

Getting it running

Difficulty · easy Time to first run · 30min

Install the package for your framework (e.g. `npm install survey-react-ui`), pass a JSON schema to the Survey component, and wire up your own submission handler.

MIT license, the core form library is free to use in any project. The visual drag-and-drop builder is a separate paid product.

In plain English

SurveyJS Form Library is an open-source JavaScript library for adding forms, surveys, quizzes, and questionnaires to a web application. Instead of building form logic by hand, developers describe the form in a JSON file (a structured text format listing the questions, types, and rules), and the library reads that file and renders the form in the browser. This approach makes it straightforward to update or reuse forms without rewriting interface code. The library works with React, Angular, Vue, jQuery, and plain HTML/CSS/JavaScript. It is client-side only, meaning it runs in the user's browser and sends the collected answers to whatever server or database the developer chooses. There is no required back-end service from SurveyJS itself, so data stays on your own infrastructure with no limits on how many forms or submissions you can have. Supported form styles include multi-page forms, pop-up surveys, quizzes with scoring, and calculator-style forms. There are more than 20 built-in input types, support for conditional logic (show or hide questions based on previous answers), input validation, auto-save, and the ability to load dropdown options from external web services. The library also handles localization, supporting community translations in over 50 languages and right-to-left text layouts. Beyond the core form library, the SurveyJS family includes a drag-and-drop form builder (Survey Creator) for designing forms visually without writing JSON by hand, a dashboard component for viewing aggregated results, and a PDF export tool. The form builder is a separate commercial product, the form library itself is MIT-licensed and free. Getting started involves installing the package for your chosen framework (React, Angular, or Vue), passing it a JSON schema, and pointing the submission handler at your own API or database.

Copy-paste prompts

Prompt 1
I'm building a React app and want to add a multi-page survey using SurveyJS. Show me a minimal JSON schema with 3 questions and the React component code to render it.
Prompt 2
How do I add conditional logic to a SurveyJS form so that a follow-up question only appears if the user answers 'Yes' to a previous question?
Prompt 3
I want to populate a SurveyJS dropdown from an external REST API. Show me how to configure the `choicesFromUrl` option in the JSON schema.
Prompt 4
Write a SurveyJS JSON schema for a 5-question quiz with scoring, and show me how to display the final score when the user submits.
Prompt 5
How do I handle SurveyJS form submission and send the answers to my own Express.js API endpoint?
Open on GitHub → Explain another repo

← surveyjs on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.