---
title: Record List View
product: Form Library
description: Browse expandable records in a read-only SurveyJS Dynamic Panel for JavaScript. Search and filter workshops, sort by seat availability, and page through results.
framework: React
source: https://surveyjs.io/form-library/examples/record-list-view/reactjs
index: https://surveyjs.io/form-library/examples/overview.md
---

# Record List View (React)

Record List View enables your users to explore large datasets with ease. It is built on a read-only [Dynamic Panel](/form-library/documentation/api-reference/dynamic-panel-model) and displays each record as an expandable item. Search, filtering, sorting and pagination help users find the records they need and choose which matches to review first. Their search, filters and sort order stay applied as they move between pages.

Refer to the following demos for information on how to configure search, filtering, sorting, and pagination for your own card view:

[Filtering and Searching in Dynamic Panel](/form-library/examples/filtering-in-dynamic-panel/ (linkStyle))

[Sorting in Dynamic Panel](/form-library/examples/sorting-in-dynamic-panel/ (linkStyle))

[Paging in Dynamic Panel](/form-library/examples/paging-in-dynamic-panel/ (linkStyle))

Make the following additional adjustments when configuring a Dynamic Panel as a record card view:

- [`keyName: "id"`](/form-library/documentation/api-reference/dynamic-panel-model#keyName)\
Designates `id` as the record key. 

- [`readOnly: true`](/form-library/documentation/api-reference/dynamic-panel-model#readOnly)\
Prevents users from editing fields and from adding or removing cards.

- [`readOnlyMode: "view"`](/form-library/documentation/api-reference/question#readOnlyMode)\
Displays read-only field values as text.

- [`panelsState: "collapsed"`](/form-library/documentation/api-reference/dynamic-panel-model#panelsState)\
Starts cards collapsed so that users can scan their titles and descriptions before expanding them.

- [`noEntriesText: "No workshops match your filters."`](/form-library/documentation/api-reference/dynamic-panel-model#noEntriesText)\
Sets the message shown when no cards are visible.

- [`widthMode: "responsive"`](/form-library/documentation/api-reference/survey-data-model#widthMode)\
Fits the survey to the available width when set at the survey level.

- [`showNavigationButtons: false`](/form-library/documentation/api-reference/survey-data-model#showNavigationButtons)\
Hides survey navigation buttons, including **Complete**, when set at the survey level.

## See Also

[Data Grid View](/form-library/examples/data-grid-view/ (linkStyle))

## Files

### `public/index.html`

```html
<link href="https://fonts.googleapis.com/css?family=Open%20Sans:400,600&display=swap" rel="stylesheet">
<div id="surveyElement" style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; min-height: 100%; height:100%"></div>
```

### `src/SurveyComponent.jsx`

```js
import React from "react";
import { Model } from "survey-core";
import { Survey } from "survey-react-ui";
import "survey-core/survey-core.min.css";
import "./index.css";
import { json } from "./json";

function SurveyComponent() {
    const survey = new Model(json);
    survey.onComplete.add((sender, options) => {
        console.log(JSON.stringify(sender.data, null, 3));
    });
    survey.data = {
      workshops: [
        {
          "id": "W101",
          "session": "Design Systems Essentials",
          "instructor": "Maya Chen",
          "track": "Design",
          "level": "Beginner",
          "seats": 6,
          "duration": 60,
          "agenda": "Audit an interface, identify reusable patterns, and define a small set of design tokens."
        },
        {
          "id": "W102",
          "session": "Building Accessible Forms",
          "instructor": "Leo Martin",
          "track": "Development",
          "level": "Intermediate",
          "seats": 4,
          "duration": 75,
          "agenda": "Build a keyboard-friendly form and test its labels, focus order, and validation messages."
        },
        {
          "id": "W103",
          "session": "Dashboard Storytelling",
          "instructor": "Maya Chen",
          "track": "Data",
          "level": "Intermediate",
          "seats": 0,
          "duration": 60,
          "agenda": "Choose a dashboard's key metric and arrange its charts around the questions readers need to answer."
        },
        {
          "id": "W104",
          "session": "SQL for Beginners",
          "instructor": "Anika Rao",
          "track": "Data",
          "level": "Beginner",
          "seats": 8,
          "duration": 90,
          "agenda": "Write queries to filter records, join tables, and summarize a small set of orders."
        },
        {
          "id": "W105",
          "session": "Advanced TypeScript",
          "instructor": "Jonas Kim",
          "track": "Development",
          "level": "Advanced",
          "seats": 0,
          "duration": 90,
          "agenda": "Use generics, conditional types, and mapped types to model a typed API client."
        },
        {
          "id": "W106",
          "session": "Prototyping with Components",
          "instructor": "Elena Park",
          "track": "Design",
          "level": "Intermediate",
          "seats": 3,
          "duration": 60,
          "agenda": "Build an interactive prototype with reusable components and test a short user flow."
        },
        {
          "id": "W107",
          "session": "Practical Data Visualization",
          "instructor": "Anika Rao",
          "track": "Data",
          "level": "Advanced",
          "seats": 2,
          "duration": 75,
          "agenda": "Compare chart types, encode a second measure, and annotate the most important change."
        },
        {
          "id": "W108",
          "session": "Getting Started with Web APIs",
          "instructor": "Jonas Kim",
          "track": "Development",
          "level": "Beginner",
          "seats": 5,
          "duration": 60,
          "agenda": "Read API documentation, make a request, and render its JSON response in a small app."
        },
        {
          "id": "W109",
          "session": "Mapping User Journeys",
          "instructor": "Elena Park",
          "track": "Design",
          "level": "Beginner",
          "seats": 12,
          "duration": 60,
          "agenda": "Map a common task from start to finish and identify where users need extra guidance."
        },
        {
          "id": "W110",
          "session": "Testing React Components",
          "instructor": "Leo Martin",
          "track": "Development",
          "level": "Advanced",
          "seats": 7,
          "duration": 90,
          "agenda": "Write interaction tests for a component that loads, filters, and displays a list."
        },
        {
          "id": "W111",
          "session": "Cleaning Data with Python",
          "instructor": "Anika Rao",
          "track": "Data",
          "level": "Intermediate",
          "seats": 11,
          "duration": 90,
          "agenda": "Clean a CSV file by fixing missing values, standardizing categories, and removing duplicates."
        },
        {
          "id": "W112",
          "session": "Designing Accessible Color Palettes",
          "instructor": "Elena Park",
          "track": "Design",
          "level": "Intermediate",
          "seats": 9,
          "duration": 60,
          "agenda": "Build a palette, check contrast, and test how colors communicate state."
        },
        {
          "id": "W113",
          "session": "Debugging JavaScript",
          "instructor": "Jonas Kim",
          "track": "Development",
          "level": "Beginner",
          "seats": 10,
          "duration": 60,
          "agenda": "Use breakpoints and the call stack to trace a bug from a click to its source."
        },
        {
          "id": "W114",
          "session": "Form Validation Patterns",
          "instructor": "Leo Martin",
          "track": "Development",
          "level": "Intermediate",
          "seats": 6,
          "duration": 75,
          "agenda": "Compare field-level and form-level validation and write actionable error messages."
        },
        {
          "id": "W115",
          "session": "Exploring Data with Spreadsheets",
          "instructor": "Maya Chen",
          "track": "Data",
          "level": "Beginner",
          "seats": 14,
          "duration": 75,
          "agenda": "Use filters, formulas, and a pivot table to answer questions about a sales dataset."
        },
        {
          "id": "W116",
          "session": "Writing Effective Interface Copy",
          "instructor": "Elena Park",
          "track": "Design",
          "level": "Beginner",
          "seats": 5,
          "duration": 45,
          "agenda": "Rewrite form labels, empty states, and error messages for a checkout flow."
        },
        {
          "id": "W117",
          "session": "Building Reliable Webhooks",
          "instructor": "Jonas Kim",
          "track": "Development",
          "level": "Advanced",
          "seats": 3,
          "duration": 90,
          "agenda": "Handle retries and duplicate deliveries while tracking failed webhook events."
        },
        {
          "id": "W118",
          "session": "Interviewing Users",
          "instructor": "Maya Chen",
          "track": "Design",
          "level": "Intermediate",
          "seats": 8,
          "duration": 75,
          "agenda": "Draft an interview guide, practice follow-up questions, and synthesize the notes."
        },
        {
          "id": "W119",
          "session": "Forecasting with Time Series",
          "instructor": "Anika Rao",
          "track": "Data",
          "level": "Advanced",
          "seats": 5,
          "duration": 90,
          "agenda": "Build a baseline forecast and evaluate its accuracy on a held-out period."
        },
        {
          "id": "W120",
          "session": "Designing Mobile Form Layouts",
          "instructor": "Elena Park",
          "track": "Design",
          "level": "Intermediate",
          "seats": 4,
          "duration": 60,
          "agenda": "Arrange fields, help text, and actions for a form that works on a narrow screen."
        },
        {
          "id": "W121",
          "session": "Deploying a Static Site",
          "instructor": "Leo Martin",
          "track": "Development",
          "level": "Beginner",
          "seats": 10,
          "duration": 45,
          "agenda": "Build a static site, preview it locally, and publish an update through a branch."
        },
        {
          "id": "W122",
          "session": "Visualizing Uncertainty",
          "instructor": "Maya Chen",
          "track": "Data",
          "level": "Advanced",
          "seats": 1,
          "duration": 75,
          "agenda": "Use ranges and annotations to communicate uncertainty in measured and forecast values."
        },
        {
          "id": "W123",
          "session": "Creating a Component Library",
          "instructor": "Elena Park",
          "track": "Design",
          "level": "Advanced",
          "seats": 2,
          "duration": 90,
          "agenda": "Document component states, organize variants, and review accessibility across the library."
        },
        {
          "id": "W124",
          "session": "Working with Async JavaScript",
          "instructor": "Jonas Kim",
          "track": "Development",
          "level": "Intermediate",
          "seats": 6,
          "duration": 75,
          "agenda": "Coordinate parallel requests, handle failures, and show progress while data loads."
        }
      ]
    };
    
    return (<Survey model={survey} />);
}

export default SurveyComponent;
```

### `src/index.css`

```css
/* You can add your custom CSS here. */
```

### `src/index.js`

```js
import React from "react";
import { createRoot } from "react-dom/client";
import SurveyComponent from "./SurveyComponent";

const root = createRoot(document.getElementById("surveyElement"));
root.render(<SurveyComponent />);
```

### `src/json.js`

```js
export const json = {
  "showNavigationButtons": false,
  "widthMode": "responsive",
  "pages": [
    {
      "name": "workshopBrowser",
      "elements": [
        {
          "type": "filter",
          "name": "workshopFilter",
          "title": "Filter Workshops",
          "targetQuestion": "workshops",
          "searchPlaceholder": "Search workshops",
          "allowAddPresets": true,
          "presets": [
            {
              "name": "openSeats",
              "title": "Seats available",
              "expression": "{seats} > 0"
            },
            {
              "name": "limitedSeats",
              "title": "1 to 3 seats left",
              "expression": "{seats} > 0 and {seats} <= 3"
            },
            {
              "name": "fullyBooked",
              "title": "Fully booked",
              "expression": "{seats} = 0"
            },
            {
              "name": "shortWorkshops",
              "title": "60 minutes or less",
              "expression": "{duration} <= 60"
            },
            {
              "name": "beginnerWithSeats",
              "title": "Beginner workshops with seats",
              "expression": "{level} = 'Beginner' and {seats} > 0"
            }
          ]
        },
        {
          "type": "paneldynamic",
          "name": "workshops",
          "title": "Workshops",
          "readOnly": true,
          "keyName": "id",
          "allowSort": true,
          "pageSize": 4,
          "panelsState": "collapsed",
          "templateTitle": "{panel.session}",
          "templateDescription": "{panel.track} · {panel.level} · {panel.seats} seats left",
          "noEntriesText": "No workshops match your filters.",
          "templateElements": [
            {
              "type": "text",
              "name": "session",
              "title": "Workshop title",
              "readOnlyMode": "view"
            },
            {
              "type": "text",
              "name": "instructor",
              "title": "Instructor",
              "readOnlyMode": "view",
              "startWithNewLine": false
            },
            {
              "type": "text",
              "name": "duration",
              "title": "Duration (minutes)",
              "readOnlyMode": "view",
              "inputType": "number",
              "startWithNewLine": false
            },
            {
              "type": "dropdown",
              "name": "track",
              "title": "Track",
              "readOnlyMode": "view",
              "choices": [
                "Data",
                "Design",
                "Development"
              ]
            },
            {
              "type": "dropdown",
              "name": "level",
              "title": "Level",
              "readOnlyMode": "view",
              "choices": [
                "Beginner",
                "Intermediate",
                "Advanced"
              ],
              "startWithNewLine": false
            },
            {
              "type": "text",
              "name": "seats",
              "title": "Seats available",
              "readOnlyMode": "view",
              "inputType": "number",
              "startWithNewLine": false
            },
            {
              "type": "text",
              "name": "id",
              "title": "Workshop ID",
              "readOnlyMode": "view",
              "startWithNewLine": false
            },
            {
              "type": "comment",
              "name": "agenda",
              "title": "Agenda",
              "readOnlyMode": "view"
            }
          ]
        }
      ]
    }
  ]
}
;
```

### `src/theme.js`

```js
export const themeJson = {};
```

### `package.json`

```json
{
  "dependencies": {
    "react": "latest",
    "react-dom": "latest",
    "survey-core": "latest",
    "survey-react-ui": "latest"
  },
  "devDependencies": {
    "react-scripts": "latest"
  }
}
```

## Other Frameworks

- [Angular](https://surveyjs.io/form-library/examples/record-list-view/angular.md)
- [Vue 3](https://surveyjs.io/form-library/examples/record-list-view/vue3js.md)
- [jQuery](https://surveyjs.io/form-library/examples/record-list-view/jquery.md)
- [Vanilla JS](https://surveyjs.io/form-library/examples/record-list-view/vanillajs.md)
