@namahapdf/react
v0.3.3
Published
React <NamahaEditor> component for the NamahaPDF SDK — a complete in-browser PDF editor (view, edit, annotate, sign, redact, forms).
Readme
@namahapdf/react - React PDF Viewer & Editor, Client-Side and On-Device
<NamahaEditor> is a complete PDF viewer and editor for React - view, edit,
annotate, sign, redact, and fill forms - rendered entirely client-side, in the
browser. There's no upload step and no server round-trip: the PDF never leaves the
user's device, which makes this the fastest way to add real PDF viewing and editing
in React to a web app or Next.js project without standing up a document-processing
backend. One import, one component, production-ready.
Live demo · Full docs · Get a license
npm i @namahapdf/reactimport { NamahaEditor } from '@namahapdf/react';
import '@namahapdf/react/styles.css';
export default function App() {
// The editor fills its container - give the wrapper a size.
return (
<div style={{ height: '100vh' }}>
<NamahaEditor licenseKey="YOUR_KEY" />
</div>
);
}Features
- Drop-in
<NamahaEditor>React component - view, edit, annotate, sign, redact, fill forms - Fully client-side PDF rendering - no upload, no server, no cloud dependency for the common path
- Brand theming from one hex color (
themeprop) - the full tonal scale is derived client-side, no network call - Scoped styles under
.namahapdf-root, shipped with no CSS reset, so it won't clobber the rest of your app - Works in the Next.js App Router, Pages Router, Vite, CRA, and Remix
- TypeScript-first - full type definitions, typed props (
NamahaEditorProps,NamahaTheme) - Server endpoints are opt-in, not required - only encrypted-PDF decryption and cryptographic "Sign & certify" ever call out, and only if you wire them up
Why teams pick @namahapdf/react
On-device by architecture, not by policy. Opening and editing a PDF happens
entirely in the browser tab - the file is read into memory client-side and never
uploaded. The only two operations that ever need a server are decrypting a
password-protected PDF and cryptographic ("Sign & certify") signing, and both are
opt-in via the decryptUrl/signUrl props pointed at your own backend. For every
other document there is no network call at all - for legal, healthcare, and fintech
use cases, that means privacy is structural, not a promise.
Ships in an afternoon. Three lines to mount, sane defaults, and a fully typed API
- most teams have
@namahapdf/reactin production the same day they install it.
Match your brand instantly. Pass one hex color via the theme prop and the whole
tonal scale (surfaces, borders, hover states) is derived for you, client-side.
A framework-agnostic engine underneath. @namahapdf/react wraps the same engine
as @namahapdf/core - if you need the parser/renderer/editor without the UI (a custom
interface, a non-React app, or server-side pre-processing), drop down to the headless
package.
API surface
NamahaEditor- the React componentNamahaEditorProps,NamahaTheme- types- License helpers (
configureLicense,getLicenseState, …) re-exported for convenience
The full prop reference (licenseKey, activationUrl, decryptUrl, signUrl,
theme, className, style) and framework-specific notes live in the
React SDK docs.
Licensing
Free to install and use - trial mode renders a watermark and gates premium features. A per-domain license key removes the watermark and unlocks the full feature set. Get one at pdf.namahatech.com/sdk; pricing at pdf.namahatech.com/pricing.
Related packages
| Package | What it is |
|---|---|
| @namahapdf/react | This package - the <NamahaEditor> React component |
| @namahapdf/core | Headless PDF engine (no UI) - parser, renderer, editor |
| @namahapdf/pptx | Headless PowerPoint (.pptx) engine |
| @namahapdf/sheets | Headless Excel (.xlsx) engine |
FAQ
Does @namahapdf/react upload my PDF anywhere?
No. Opening, viewing, and editing a PDF happens entirely in the browser. The only
exceptions are password-protected PDFs (decryption needs a native library that can't
run client-side) and "Sign & certify" cryptographic signing - both call an endpoint
you control, and only if you enable them.
Can I use it without React?
Yes - @namahapdf/core is the same
engine without the UI, usable from any framework or vanilla JS/TS.
Does it work with Next.js?
Yes, including the App Router - NamahaEditor is marked "use client".
Is there a free tier? Yes. It's free to install and use in trial mode (watermarked, feature-limited). See pdf.namahatech.com/pricing for licensed tiers.
Is it written in TypeScript?
Yes - full type definitions ship with the package, no @types/* needed.
License: proprietary (see LICENSE). A license key from
pdf.namahatech.com/sdk removes the trial watermark
for production use. Questions or enterprise inquiries: same link.
