Embedded React SDK Guide
Learn how to integrate interactive, client-validated web forms inside your application using our premium React package. Complete layout alignment, response handling, and CSS token setups out of the box.
Why the React SDK? Standard iframe codes are rigid and often clash with page designs. The Nexoraforms React SDK renders encapsulated inside a secure Shadow DOM, preventing styling issues and allowing complete JavaScript theme customizations.
Installation
Install the `@nexorasoft/nexoraforms-react` dependency inside your client project directory:
npm install @nexorasoft/nexoraforms-reactyarn add @nexorasoft/nexoraforms-reactBasic Integration
Import the `NexoraForms` component and pass the `accessKey` generated in your dashboard. The component automatically handles fetching schema configurations, rendering fields, validation, and submission hooks.
import React from 'react';
import { NexoraForms } from '@nexorasoft/nexoraforms-react';
export default function MyFormPage() {
return (
<div style={{ maxWidth: '600px', margin: '40px auto' }}>
<NexoraForms accessKey="nexa_your_form_access_key" />
</div>
);
}Available Component Props
You can customize the layout structure, visibility of standard components, and sizing directly using the following props on the NexoraForms component:
| Prop | Type | Default | Description |
|---|---|---|---|
| accessKey | string | Required | Your public access key (e.g. nexa_...) generated in the dashboard. |
| isTitleVisible | boolean | true | Toggle visibility of the form title header. |
| isDescriptionVisible | boolean | true | Toggle visibility of the form description subtitle. |
| width | string | "75%" | Custom container width (e.g. "100%", "500px"). |
| maxWidth | string | "800px" | Maximum form layout width restriction. |
| minWidth | string | "360px" | Minimum form layout width restriction (auto-caps dynamically on small viewports). |
| theme | object | undefined | Custom color parameters mapping overrides. |
Theme Customization
Nexoraforms is styled using dynamic CSS variables mapped directly to your properties. Passing a `theme` object overrides defaults cleanly:
import React from 'react';
import { NexoraForms } from '@nexorasoft/nexoraforms-react';
export default function StyledFormPage() {
const customTheme = {
primaryColor: '#9333ea', // Buttons, progress steps, focus rings
backgroundColor: '#000000', // Form container/surface background
textColor: '#ffffff', // Labels, descriptions, and primary text
placeholderColor: '#6b7280', // Input placeholder text color
inputBgColor: '#000000', // Input background
inputTextColor: '#ffffff', // Input value text color
inputBorderColor: '#292b31', // Input outline/border color
buttonBgColor: '#ffffff', // Submit button background
buttonTextColor: '#000000', // Submit button text color
componentBorderColor: '#292b31', // Divider and layout borders
};
return (
<NexoraForms
accessKey="nexa_your_form_access_key"
theme={customTheme}
/>
);
}/* eslint-disable-line */Available Theme Fields
| Property | Purpose | Example |
|---|---|---|
| primaryColor | Primary interactive states, active input borders, progress items. | "#9333ea" |
| backgroundColor | The background color of the outer form container. | "#000000" |
| textColor | Titles, section labels, instructions. | "#ffffff" |
| placeholderColor | Text input placeholder color representation. | "#6b7280" |
| inputBgColor | Inner background color for value input items. | "#0f0f16" |
| inputBorderColor | The outline border color of fields in default state. | "#292b31" |
| buttonBgColor | Background color of submit / active action buttons. | "#ffffff" |
Section Breaks & Steps
When designing a form inside our visual builder, adding a **Section Break** field automatically groups the preceding and following inputs into multi-step pages.
The React SDK handles this automatically, shifting the layout from a scrolling list to a wizard experience containing **Back** and **Next Page** navigation buttons, alongside an animated progress indicator.
Conditional logic
Customize visibility patterns for questions. Fields can listen to previous values dynamically. For instance, show a "Business details" field ONLY if a previous checkbox selection is set to "Corporate Client".
Evaluations are performed instantly inside the React client model, hiding or displaying relevant form steps in real-time.
Custom Script Validations
For complex validations (e.g. checking if a rating is above 3 when feedback is provided, or validating regex formats), you can write custom validations using JavaScript expression rules inside the form options.
// Example script expression (evaluates value and other inputs)
value.length >= 10 && values.allowPremium === trueAccess Keys & Api Secrets
Nexoraforms provides two methods to load forms and fetch submission entries programmatically. You can integrate form components directly inside web applications, or safely query responses on backend systems.
1. Form Access Keys
Public access keys (prefixed with nexa_) are client-facing tokens designed for browser use. They allow the client-side React sdk to fetch your form questions and submit user input. Because they are public, they do not require domain restriction or origin whitelist configurations, so you can safely use them across any frontend environment.
2. Api Keys
Api keys act as private authorization tokens (prefixed with nkey_) to download or sync form submissions securely. Never expose these keys in client scripts, browser headers, or public repositories.
Key Configuration Parameters
When creating an Api key in the developer console, you can configure granular details:
Identify which service or script uses the token (e.g., webhook client or reporting database).
Control which domains are authorized to make headers requests (e.g., https://mycompany.com).
Restrict the keys to return only specific form questions, keeping sensitive columns completely hidden.
Add match logic rule configurations (e.g., location equals coimbatore) to retrieve filtered rows only.
Limit submission data retrieval to a specific start and end date range.
Choose whether to append submission timestamps or submitter email details.
Query Submissions (cURL)
curl -H "Authorization: Bearer nkey_your_api_key" \ https://api-nexoraforms.vercel.app/api/forms/public/your_form_id/submissions
Server-side Integration (Node.js)
const response = await fetch('https://api-nexoraforms.vercel.app/api/forms/public/your_form_id/submissions', {
headers: {
Authorization: 'Bearer nkey_your_api_key'
}
});
const data = await response.json();Server-side Integration (Python)
import requests
headers = {
"Authorization": "Bearer nkey_your_api_key"
}
response = requests.get(
"https://api-nexoraforms.vercel.app/api/forms/public/your_form_id/submissions",
headers=headers
)
data = response.json()