FRAMEWORKExperimental — not for production

API guide

Public Spark entry points and their responsibilities.

Experimental — not ready for production

Legend Spark is still experimental and is not ready for production use. APIs, native implementations, and tooling can change. Public npm packages and hosted prebuilt runtimes are not available yet.

Import application APIs from @legendapp/spark/<feature>. Internal @legendapp/spark-* packages supply implementations; applications should prefer the public entry points. Framework contracts can later delegate to compatible Expo or community implementations.

These are capability groups, not a promise of identical support on every target. Check each linked guide's platform and lifecycle restrictions.

Public entry pointCapability
/app, /windowsApplication context, lifecycle, native windows and displays
/menus, /context-menu, /shortcuts, /global-shortcutsNative menus, focused shortcuts and system-wide hotkeys
/dialogs, /message-dialogNative file selection and message dialogs
/filesFiles/directories, watching, binary and streaming I/O, Trash/Recycle Bin
/settings, /secure-storageSettings and secure values
/clipboard, /linksClipboard, external URLs and incoming links
/notifications, /tray, /systemOS notifications, tray integration and system capabilities
/drag-dropFiles and custom drag payloads
/processesChild processes and managed app-supplied helpers
/sqlite, /webviewDatabase and embedded web content integrations
/audio, /auth-sessionPlayback/media sessions and browser authentication transport
/ui, /ui/uniwindNative controls and optional class-based layout styling
/updatesExperimental update integration; distribution acceptance remains outstanding

Files and desktop integration

The SDK guide and expanded API reference describe functions, options, events, and cleanup. Streaming files and Trash covers handle lifetime and binary operations.

Desktop resources need lifecycle handling: remove event subscriptions, close file handles, and handle canceled dialogs and rejected OS operations. Kitchen Sink provides runnable usage rather than hiding errors in the console.

Managed helpers

Spark does not bundle Node. An application may supply a native executable for each target OS/architecture. Spark packages it and manages its process I/O and lifetime. The application owns its protocol, requests, and recovery policy. Helpers require an app-specific runtime and are not persistent background services.

See managed sidecars and the C helper example.

Shared application APIs

Clipboard, links, secure storage, UI, and audio have selected mobile/web adapters. Desktop-only behavior should remain in platform modules or explicitly conditional application code. Unsupported features must not be assumed to work because an import resolves.

Audio covers playback and optional system media controls. Browser authentication supplies browser/callback transport; provider SDKs and token exchange remain application responsibilities.

WebView and SQLite are integrations with platform-specific limits, not Electron or Node compatibility layers. Check known Windows issues before relying on their Windows implementations.