SurveyJS 3.2.1

Prefix Reserved
dotnet add package SurveyJS --version 3.2.1
                    
NuGet\Install-Package SurveyJS -Version 3.2.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SurveyJS" Version="3.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SurveyJS" Version="3.2.1" />
                    
Directory.Packages.props
<PackageReference Include="SurveyJS" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SurveyJS --version 3.2.1
                    
#r "nuget: SurveyJS, 3.2.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SurveyJS@3.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SurveyJS&version=3.2.1
                    
Install as a Cake Addin
#tool nuget:?package=SurveyJS&version=3.2.1
                    
Install as a Cake Tool

SurveyJS Form Library for ASP.NET Core and Blazor

Build dynamic forms, surveys, and quizzes from JSON with SurveyJS Form Library.

SurveyJS Form Librar

This NuGet package supplies the JavaScript and CSS assets for rendering forms in ASP.NET Core and Blazor applications without an npm build step.

SurveyJS is a metapackage that installs SurveyJS.Core and SurveyJS.JsUi. Its assets are served from the component packages' _content/ paths.

Installation

In your application's project directory, run:

dotnet add package SurveyJS --version 3.2.1

Requires .NET 8 or later. Keep all SurveyJS packages in your application on the same version.

Quick Start

Ensure your ASP.NET Core application serves static web assets from referenced packages. In a .NET 8 application, configure app.UseStaticFiles() in Program.cs. Keep the static asset configuration provided by newer ASP.NET Core templates.

Add the following resources to your HTML page or shared layout, in the order shown:

<link rel="stylesheet" href="_content/SurveyJS.Core/survey-core.min.css" />
<script src="_content/SurveyJS.Core/survey.core.min.js"></script>
<script src="_content/SurveyJS.JsUi/survey-js-ui.min.js"></script>

Font files are not included in this package. Load Open Sans separately for the default appearance, or load your application's chosen font.

Place the following container and initialization script in the page body:

<div id="surveyContainer"></div>
<script>
  const surveyJson = {
    title: "Contact information",
    pages: [{
      elements: [{ type: "text", name: "fullName", title: "Your name", isRequired: true }]
    }]
  };

  const survey = new Survey.Model(surveyJson);
  survey.onComplete.add((sender) => {
    // Send sender.data to your application's API to persist the response.
    console.log(sender.data);
  });
  survey.render(document.getElementById("surveyContainer"));
</script>

This example logs responses to the browser console. To save them, see Store Survey Results.

Using Blazor

The form runs in JavaScript. In Blazor, load the resources in the host page and call your JavaScript initialization function through JS interop after the container renders (OnAfterRenderAsync). Keep the instance for the component's lifetime, and call survey.dispose() when removing it. Transfer definitions and responses through JS interop as needed.

Additional Assets

SurveyJS.Core supplies the following static web assets, including localization scripts, predefined themes, and theme adapter stylesheets:

Asset Path
Model _content/SurveyJS.Core/survey.core.min.js
Shared styles _content/SurveyJS.Core/survey-core.min.css
All translations _content/SurveyJS.Core/survey.i18n.min.js
Individual translations _content/SurveyJS.Core/i18n/*.min.js
Predefined themes _content/SurveyJS.Core/themes/*.min.js
Theme adapter styles _content/SurveyJS.Core/themes/adapters/*.css

The core script exposes the Survey global, including Survey.Model. The wildcard paths identify groups of files—reference a specific filename in your HTML. See the following guides for setup and customization:

Documentation and Support

The JavaScript guides use npm or CDN paths. With this NuGet package, use the _content/ paths shown above for the equivalent assets.

License

SurveyJS Form Library is MIT-licensed and does not require a license key. Survey Creator, Dashboard, and PDF Generator are separate commercial products. See SurveyJS licensing.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on SurveyJS:

Repository Stars
surveyjs/surveyjs-aspnet-core
This demo shows how to integrate SurveyJS components with a .NET Core backend.
Version Downloads Last Updated
3.2.1 29 10/13/2026
3.2.0 58 10/8/2026
3.1.2 96 10/5/2026