SurveyJS Form Library is a free and open-source JavaScript form library for rendering dynamic, JSON-based forms and surveys in React, Angular, Vue, and plain JavaScript applications. It collects responses in the browser and lets you send submitted data to any backend or database.
Use it to build complex multi-step forms, pop-up surveys, quizzes, scored surveys, calculator forms, and other data-entry tools. Form content and structure, validation, conditional logic, navigation, and appearance are defined through a SurveyJS JSON form definition.
You can create form definitions manually, generate them with AI, or build them visually with SurveyJS Creator, an embeddable drag-and-drop form builder.
Documentation · Setup Guides for My Stack · Form Library Demos · Theme Adapters · Store Survey Results · Report Bug
form-library.mp4
How It Works
SurveyJS Form Library renders forms from JSON definitions directly in your web application. It runs in the browser and does not require a SurveyJS backend, so you retain control over form definitions, submitted responses, and data storage.
Your application can:
- Create or load a SurveyJS JSON form definition.
- Render it with SurveyJS Form Library.
- Collect responses in the browser.
- Send submitted data to your backend.
- Store it in the database or service of your choice.
Installation
Choose the package for your framework:
React Form Library
npm install survey-react-ui
Get Started with Form Library for React
Angular Form Library
npm install survey-angular-ui
Get Started with Form Library for Angular
Vue.js Form Library
npm install survey-vue3-ui
Get Started with Form Library for Vue.js
Plain JavaScript Form Library
npm install survey-js-ui
Get Started with Form Library for Plain JavaScript
Package Architecture
SurveyJS Form Library separates form logic from rendering. The framework-independent survey-core package provides the form model, validation, conditional logic, calculations, navigation, localization, and other core behavior. Framework-specific packages such as survey-react-ui, survey-angular-ui, and survey-vue3-ui render that model in React, Angular, and Vue 3 applications. Installing a rendering package brings survey-core with it.
Key Features
Dynamic Forms and Surveys
- Multi-step forms, quizzes, scored surveys, calculator forms, and survey pop-ups
- Conditional visibility, branching, calculated values, and expression-based logic
- Input validation, partial submissions, auto-save, and lazy loading
- Dynamic panels, repeating question groups, carry-forward responses, and text piping
- Multiple navigation modes for long and complex forms
Multi-Framework Support
- Dedicated Form Library rendering packages for React, Angular, Vue 3, and plain JavaScript
- TypeScript support
- Client-side rendering with no required SurveyJS backend
Data and Backend Integration
- Connect to any server, API, or database
- Store form definitions and submitted responses in your own infrastructure
- Load choices from web services
- Integrate with third-party libraries, payment systems, and custom backend workflows
- Backend integration examples for PHP, ASP.NET Core, and Node.js
Form Controls
- 20+ built-in question and input types
- Custom question types and input components
- Electronic signature and image capture
- Reusable composite questions and third-party widgets
Localization and Accessibility
- Community-supported localization for 50+ languages
- Multi-language forms and automatic locale selection
- Right-to-left language support
- Accessible input controls and keyboard navigation
Appearance and UI Customization
- Shared design token system based on CSS variables
- Built-in themes with support for custom branding
- Theme Adapters for Bootstrap, Material UI, and shadcn/ui
- Custom question rendering and reusable UI components
- Configurable layouts, navigation controls, validation messages, and form behavior
Resources
SurveyJS Product Family
- Form Library - A free and open-source MIT-licensed JavaScript library that renders dynamic JSON-based forms in your web application, and collects responses.
- Survey Creator - An embeddable drag-and-drop form builder that generates SurveyJS JSON form definitions. Try out a free full-featured demo to evaluate its capabilities.
- Dashboard - Simplifies survey data visualization and analysis with interactive and customizable charts and tables.
- PDF Generator - Renders SurveyJS surveys and forms as PDF files in a browser. Save custom forms to PDF (both editable and read-only).
- AI Form Response Extractor - A free and open-source MIT-licensed JavaScript library that extracts responses from paper forms, PDFs, and images, maps them to the SurveyJS schema, and produces a unified response object that can be stored and processed alongside online submissions. (
ai-form-response-extractor).
Build from Source
-
Build one of the UI packages
Licensing
SurveyJS Form Library is distributed under the MIT license.
