Integration

SDK for Developer

Browser-to-printer in one bridge — headless label printing SDK for any web app

The TopBridge SDK is a headless, browser-native library for embedding label printing directly into your web application. JS Core is live now on npm; React and Next.js wrappers are coming soon.

Built for production from day one: zero external dependencies, one-line preflight orchestration (health check → quota validation → printer discovery), 10 structured error types with instanceof narrowing, auto-launch + retry for the TopBridge tray app, and a security model covering fixed connection endpoints, origin verification, input sanitization, and build-time obfuscation.

npm package: @appzgatenz/label-print-topbridge-js — install directly with npm install @appzgatenz/label-print-topbridge-js.

Documentation & help: read the SDK Getting Started guide for installation, API reference, and code examples.

Don’t want to install locally? Try our live playground to experience the SDK directly in your browser — no setup required.

Source on GitHub: the playground demo is open-source — explore the full integration code at github.com/youngming/label-print-topbridge-js-SDK-demo.

example.ts
import { TopBridgeClient } from '@appzgatenz/label-print-topbridge-js';

const client = new TopBridgeClient();

// Preflight: health check → quota → printer discovery
const { printers } = await client.preflight.run();

// Print a label
await client.print.execute({
  template: 'PRICE_LABEL',
  printer:  'TSC DA220',
  products: [
    { name: 'Apple', price: 3.99, copies: 2 },
  ],
});