Skip to content

Installation

The MagicFeedback SDK is published on npm as @magicfeedback/native.

Terminal window
npm install @magicfeedback/native

Or with yarn / pnpm:

Terminal window
yarn add @magicfeedback/native
pnpm add @magicfeedback/native

The SDK ships a default stylesheet. Import it once at the entry point of your app, or load it from your CDN of choice in plain HTML.

import "@magicfeedback/native/dist/styles/magicfeedback-default.css";
<link
rel="stylesheet"
href="./node_modules/@magicfeedback/native/dist/styles/magicfeedback-default.css"
/>

The stylesheet is required for the survey to render correctly. You can fully override its appearance via CSS variables.

This SDK is browser-only. It relies on window, document, navigator, and localStorage. Do not call it during server-side rendering — wrap it in a client-only component or run it inside useEffect (React) or onMount (Svelte/Vue).

For React Native, see the React Native reference.

import magicfeedback from "@magicfeedback/native";
magicfeedback.init({ env: "dev", debug: true });
console.log("MagicFeedback SDK initialized");

If you see the log line with no errors, you are ready to render a form — head to the Quickstart.