Cart Licenses Contact Support Online Creator Log in/Register
v 1.9.51

Single-Selection Matrix


                    var json = {
  "elements": [
      "type": "matrix",
      "name": "quality",
      "title": "Please indicate if you agree or disagree with the following statements",
      "columns": [{
        "value": 5,
        "text": "Strongly agree"
      }, {
        "value": 4,
        "text": "Agree"
      }, {
        "value": 3,
        "text": "Neutral"
      }, {
        "value": 2,
        "text": "Disagree"
      }, {
        "value": 1,
        "text": "Strongly disagree"
      "rows": [
          "value": "affordable",
          "text": "Product is affordable"
          "value": "does what it claims",
          "text": "Product does what it claims"
          "value": "better than others",
          "text": "Product is better than other products on the market"
          "value": "easy to use",
          "text": "Product is easy to use"
      "alternateRows": true,
      "isAllRowRequired": true
  "showQuestionNumbers": "off"

                    window.survey = new Survey.Model(json);
            survey.onComplete.add(function(sender) {
            document.querySelector('#surveyResult').textContent =
            "Result JSON:\n" + JSON.stringify(, null, 3);
            var app = new Vue({
            el: '#surveyElement',
            survey: survey

<!DOCTYPE html>
<html lang="en">
    <title>Single-Selection Matrix, Vue Survey Library Example</title>
<meta name="viewport" content="width=device-width" />
    <script src=""></script>
    <script src="/DevBuilds/survey-core/survey.core.min.js"></script>
    <script src="/DevBuilds/survey-core/survey.i18n.min.js"></script>
    <script src="/DevBuilds/survey-vue-ui/survey-vue-ui.min.js"></script>
    <link href="/DevBuilds/survey-core/defaultV2.min.css" type="text/css" rel="stylesheet" />
    <link rel="stylesheet" href="./index.css">

<body style="margin: 0">
            <div id="surveyElement" style="display:inline-block;width:100%;">
                <survey :survey='survey' />
    <div id="surveyResult"></div>

<script type="text/javascript" src="./index.js"></script>


Matrix table questions combine multiple survey questions with identical answers. They are useful when you need to ask respondents to rate statements on the same scale. A good matrix table question example is a Likert scale survey question (also known as a satisfaction scale). It allows respondents to describe their attitude to certain statements on a 5 to 7-point scale or answer several close-ended questions with the same choice options. If you want to allow only one scale point per statement to be selected, use a single-selection matrix question. This question displays statements in the form of a grid with radio buttons. This demo shows a matrix table survey question example and describes how to configure a single-choice matrix question.

To add a single-answer matrix to your survey, create an object with the type property set to "matrix" and add the object to the elements array. Configure statements in the rows array, and matrix answer choices (scale points)—in the columns array. Both arrays accept objects with the following structure:

  "value": any, // A value to be saved in the survey results
  "text": String, // A display text. When `text` is undefined, `value` is used.

Statements (rows) and scale points (columns) have the same sort order as their objects in the rows and columns arrays. To reverse the order of a matrix table scale, reorder the corresponding objects.

If you want users to rate all statements, enable the isAllRowRequired property. In this case, the matrix question produces a validation error if at least one statement is left unrated.

This demo also shows how you can alternate the color of rows. Set the alternateRows property to true to enable this functionality.