🔌 survey-standalone
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.
advantages
- framework agnostic
limitations
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.
examples
- 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
installation (npm):
npm install survey-standalone
installation (es5 style / script):
<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>
usage
<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);
api docs
check the SurveyJS documentation
build
git clone https://github.com/dmitrykurmanov/survey-standalone.git
npm install
npm run dev