Skip to content

🔌SurveyJS library standalone implementation based on Svelte. It can be used with any framework or without any one.

License

Notifications You must be signed in to change notification settings

dmitry-kurmanov/survey-standalone

Repository files navigation

🔌 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

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

thanks to

SurveyJS
Svelte
Rollup
YogliB

About

🔌SurveyJS library standalone implementation based on Svelte. It can be used with any framework or without any one.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published