UI Components
Drop-in React components for teacher dashboards, file upload, and payment flows.
All components are pure Tailwind — no shadcn/ui dependency. Wrap your app in <NexaProvider> once and every component picks up the correct API base path automatically.
Setup
ResultsViewerSheet
A slide-over panel with three tabs: Pipeline, Records, and Stats.
UploadZone
Drag-and-drop file upload wired to nexa.files.submit().
DocumentSelector
Lists a user's uploaded documents with processing status badges.
StatusBanner
Shows the current processing status for a file (queued → extracting → refining → complete).
PipelineTimeline
Detailed step-by-step OCR pipeline visualization with per-stage timing.
StudentRecordsTable
Drop-in, fully self-contained records table. Pass only a fileId — fetching, pagination, filters, inline editing, column sort/reorder, bulk operations, export (XLSX / CSV / JSON), import sync with diff preview, and roster matching are all built in.
See OCR Records UI for the full feature list, all props, and a custom-page example.
RecordDataGrid
Lower-level records grid. All features opt-in via props — omit a prop group to disable it entirely.
See OCR Records UI for the complete props reference.
PageDetailPanel
Per-page record review with the original scanned image alongside extracted fields.
StatsPanel
Subject pass/fail rates, average scores, and grade distribution charts.
NexaPaymentWidget
Standalone payment widget: loads fee config, displays the total, opens Paystack checkout, and polls for completion.
Props
| Prop | Type | Description |
|---|---|---|
email | string | Customer email for Paystack |
netAmount | number | Amount school receives (kobo). Widget auto-calculates gross. |
metadata | PaymentMetadata | Passed through to webhook |
onSuccess | (reference: string) => void | Called when payment is confirmed |
onError | (error: PaymentError) => void | Called on failure |
reference | string? | Custom reference; auto-generated if omitted |
EnrollmentPaymentFlow
3-step flow: fee breakdown → payment → confirmation receipt.
PaymentConfigPanel
Admin UI to view and update the platform fee configuration.
Renders a form with fee percentage, fixed fee, and bank account fields. Calls GET/POST /api/nexa/payments/config automatically.
PaymentStatusDashboard
Transaction list with search, status filter, date range, and CSV export.
StudentEmailAccountManager
Create, list, suspend, restore, and reset passwords for student email accounts. All actions go through your /api/student-emails/* routes — no API key is exposed to the browser.
Props
| Prop | Type | Required | Description |
|---|---|---|---|
tier | EmailTier | Yes | Email tier: "tier-1-nexa" | "tier-2-stalwart" | "tier-3-google" |
domain | string | Yes | Email domain, e.g. "loretto.edu.ng" |
basePath | string | No | API proxy base path. Defaults to "" |
onAccountCreated | (account: StudentEmail) => void | No | Called after successful account creation |
Warning
Live key required. Accounts created through this component call your live /api/student-emails/create endpoint.
Use a test key during development — you will receive a sandboxed response with _testMode: true.
EmailBulkProvisioningPanel
Provision up to 500 student accounts at once with live job progress tracking. Fires a bulk job and polls for completion every 3 seconds automatically.
Props
| Prop | Type | Required | Description |
|---|---|---|---|
tier | EmailTier | Yes | Email tier |
domain | string | Yes | Email domain |
students | EmailCreateFormData[] | No | Pre-load students array — skips textarea |
basePath | string | No | API proxy base path. Defaults to "" |
onJobComplete | (progress: EmailJobProgress) => void | No | Called when job reaches completed or failed |