S
Documentation

Installation

Install the library using your preferred package manager.

npm install react-minimal-survey-builder

Peer Dependencies

The library requires react and react-dom version 17 or higher.

package.jsonjson
"peerDependencies": {
  "react": ">=17.0.0",
  "react-dom": ">=17.0.0"
}

Entry Points

The library provides three separate entry points for optimal tree-shaking:

react-minimal-survey-builder

Main entry point. Includes React hook, renderer, and all types.

react-minimal-survey-builder/core

Core engine only. Schema parser, validation, condition evaluator, state manager. Framework-agnostic.

react-minimal-survey-builder/builder

Drag & drop builder. Visual survey editor with live preview and JSON editor.

TypeScript

Full TypeScript declarations (.d.ts) are included. No additional @types packages needed.

import type { SurveySchema, Question, AnswerValue } from 'react-minimal-survey-builder';

Note

The builder entry point includes React components and is not framework-agnostic. If you only need the core engine for a non-React project, use the /core entry point.