MIT License

项目介绍

surveyjs/survey-library 是一个托管在 GitHub 上的开源项目,主要使用 TypeScript 编写,采用 MIT License 许可证,目前获得 4.9k 个 Star、928 次 Fork。

仓库全名
surveyjs/survey-library
开源许可证
MIT License
Star 数
4.9k
Fork 数
928
未关闭 Issue
444

README 摘要

SurveyJS Form Library 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…

完整内容见 GitHub 原始 README 或本页 。

常见问题

survey-library 用什么语言开发?

主要使用 TypeScript 编写,采用 MIT License 许可证,目前有 4.9k 个 Star。

survey-library 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 survey-library 的源码?

可以直接克隆仓库:git clone https://github.com/surveyjs/survey-library.git,默认分支为 master;安装与运行步骤见仓库 README。

survey-library 最近还在维护吗?

仓库最近一次更新为 1 天前,当前有 444 个未关闭 Issue;Star 数为 4.9k,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

SurveyJS is an open-source JavaScript form builder library that allows developers to create dynamic forms, multi-step form wizards, and survey applications. It supports React, Angular, and Vue.js (Vue 3), and can also be used in applications built with plain JavaScript.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

CSS
HTML
JavaScript
PEG.js
SCSS
Shell
TypeScript
Vue

Release

README

banner_form_library

Build Status Software License Tested with Playwright Issues Closed issues GitHub Release

SurveyJS Form Library

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


https://github.com/surveyjs/survey-library/assets/102306951/844563b2-c7c3-400c-962f-bcdbe7274d55

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:

  1. Create or load a SurveyJS JSON form definition.
  2. Render it with SurveyJS Form Library.
  3. Collect responses in the browser.
  4. Send submitted data to your backend.
  5. 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

Form Controls

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

  1. Build the platform-independent part

  2. Build one of the UI packages

Licensing

SurveyJS Form Library is distributed under the MIT license.

评论

暂无评论