SurveyJS is a modern way to add surveys and forms to your website. It has versions for angular2+, jQuery, knockout, react and vue frameworks. This is standalone implementation of SurveyJS library. It can be used with any framework or without any one.
- framework agnostic
This is my "side" hobby project and it doesn't contain all SurveyJS questions and features. If you want to request some functionality from the SurveyJS library feel free to create an issue here.
- script tag (no framework): https://plnkr.co/edit/mU5ct7cCCGrG4eNp
- es vanilla (no framework): https://codesandbox.io/s/survey-standalone-vanilla-example-g0k31
- Svelte: https://codesandbox.io/s/survey-standalone-svelte-example-sis80
- React: https://codesandbox.io/s/survey-standalone-react-example-34081
- Vue: https://codesandbox.io/s/survey-standalone-vue-example-zdcnr
- Angular: https://codesandbox.io/s/survey-standalone-angular-example-2x4c6
npm install survey-standalone
<link rel="stylesheet" href="https://unpkg.com/survey-standalone/dist/survey-standalone.css" />
<script src="https://unpkg.com/survey-standalone/dist/survey-standalone.min.js"></script>
<div id="surveyElement"></div>
Survey.StylesManager.applyTheme('modern');
const json = {
title: 'Survey standalone example !',
pages: [
{
questions: [
{
type: 'radiogroup',
name: 'car',
title: 'What car are you driving?',
isRequired: true,
hasOther: true,
colCount: 4,
choices: [
'None',
'Ford',
'Vauxhall',
'Volkswagen',
'Nissan',
'Audi',
'Mercedes-Benz',
'BMW',
'Peugeot',
'Toyota',
'Citroen',
],
},
],
}
],
};
const targetNode = document.querySelector('#surveyElement');
window.survey = new Survey(json);
survey.showProgressBar = 'top';
survey.render(targetNode);
check the SurveyJS documentation
git clone https://github.com/dmitrykurmanov/survey-standalone.git
npm install
npm run dev