2.1.0 • Published 3 years ago

material-survey v2.1.0

Weekly downloads
937
License
ISC
Repository
github
Last release
3 years ago

Material Survey

npm version

A material ui survey library for displaying and retrieving input from complex forms. Demo

This survey powers surveys on collegeai.com.

import Survey from "material-survey/components/Survey"

const App = () => (
  <Survey
    onFinish={answers => {
      // Do something with the answers
    }}
    form={{
      questions: [
        {
          name: "favorite-fruit",
          title: "What is your favorite fruit?",
          type: "dropdown",
          choices: ["Apple", "Orange", "Watermelon"]
        }
      ]
    }}
  />
)

Want new features? Found a bug? Feel free to leave an issue or a pull request.

Interactive Demo

The entire storybook for Material Survey can be viewed here. Click the components on the left side of the page to see example components, at the bottom of the page shows the code to produce each component.

The most important component in Material Survey is the Survey component, click here to view the Survey component.

Survey Props

const App = () => (
  <Survey
    // See the "format" section, this is the SurveyJS/Material Survey format
    form={
      {
        /* ... */
      }
    }
    // Optional: Invoked when the user clicks submit or finishes survey
    // AnswerObject => any
    onFinish={answers => null}
    // Optional: Required for file upload. Must handle uploading and return URL of file.
    // File => Promise<string>
    onFileUpload={file => ""}
    // Optional: Handles autocomplete requests, should return list of options for a given query
    // (requestUrl: string, queryValue: string) => Promise<Array<{ value: string, label: string, subLabel?: string }>>
    autocompleteRequest={(requestUrl, queryValue) => Promise.resolve([])}
    // Optional: Called anytime a question is changed
    // (questionId: string, newValue: any, answers: Object) => null
    onQuestionChange={(questionId, newValue, answers) => null}
    // Optional: default answers or previous answers to Survey
    // Object
    defaultAnswers={{}}
    // Optional: Style variants for the survey
    // "flat" | "paper"
    variant="paper"
    // Optional: Whether or not to show complete/next/prev buttons
    // boolean
    noActions={false}
    // Optional: Customize complete text/content. Accepts React element.
    // string | React$Element
    completeText="Complete"
  />
)

Format

The MaterialSurvey format is based off the SurveyJS format. Check docs/material-survey-format.md.

Developing / Testing

This project uses storybook. To develop features or create visual tests just run yarn install && yarn storybook in the cloned repository.

react-image-annotate-filterable@everything-registry/sub-chunk-2138react-wound-image-annotatereact_image_annotate_ns_workflowreact_image_annotate_ns_workflow_3react_image_annotate_ns_workflow_7react_image_annotate_ns_workflow_8react_image_annotate_ns_workflow_9react_image_annotate_nsworkflow_2024image-annotate-reactholman-react-image-annotatens_workflow_image_annotationns_workflow_image_annotation_2024ns_workflow_image_annotationsreact-image-bound-boxreact-image-annotatereact-image-annotate-2react-image-annotate-adexereact-image-annotate-cnreact-image-annotate-coonereact-image-annotate-customreact-image-annotate-custom-region-edit-labelreact-image-annotate-forkreact-image-annotate-masterreact-image-annotate-master-customreact-image-annotate-prabathreact-image-annotate-prop-2react-image-annotate-switchonreact-image-annotate-switchon-ratanreact-image-annotate-switchon-ratan1react-image-annotate-switchon1react-image-annotate_ns_demoreact-image-annotate_ns_demo_brushreact-image-labelingreact-image-taggerreact-imannotatereact-multiple-image-annotatetusk-annotatetusk-annotate-tool@dataunion.app/react-annotate@dataunion/react-annotateyss-image-annotateuniversal-data-tooluniversal-data-tool-test@eylonkoenig/react-image-annotate@intelligence-stack/react-image-annotate@rediminds/image-video-annotator@silentnerd/react-image-annotate@searpent/react-image-annotate@wcarpenter96/react-image-annotateai-image-annotator@zalastax/nolb-material-coraldd-react-image-annotatecoraldd-universal-data-toolcustom-react-image-annotate
2.1.0

3 years ago

1.0.41

4 years ago

1.0.40

4 years ago

1.0.39

4 years ago

1.0.38

4 years ago

1.0.37

4 years ago

1.0.36

4 years ago

1.0.35

5 years ago

1.0.34

5 years ago

1.0.33

5 years ago

1.0.32

5 years ago

1.0.31

5 years ago

1.0.30

5 years ago

1.0.29

5 years ago

1.0.28

5 years ago

1.0.27

5 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago