Skip to main content

Package Manager

Install via npm or any compatible package manager:
Then import and use in your application:

CDN / Script Tag

For sites without a build system, load the widget directly from a CDN:
The UMD build exposes a global VizochokWidget constructor.
Pin a specific version in production (e.g., @vizochok/[email protected]) instead of @latest to avoid unexpected breaking changes.

Bundle Size

The SDK has zero runtime dependencies. All styles are bundled as a template literal string and injected into a Shadow DOM <style> element at mount time.

TypeScript Support

The package ships with full TypeScript declarations (dist/types.d.ts). All public interfaces are exported:
No additional @types/ package is needed.

Browser Compatibility

The widget uses standard Web APIs and is compatible with all modern browsers:
The widget relies on Shadow DOM v1 for CSS isolation and WebSocket for real-time communication. Internet Explorer is not supported.

Module Formats

The package provides two build outputs:
  • ESM (vizochok-widget.esm.js) — for modern bundlers (Vite, Webpack 5, Rollup, esbuild). Referenced via the module field in package.json.
  • UMD (vizochok-widget.umd.js) — for script tags and legacy bundlers. Referenced via the main field in package.json.
Most bundlers will automatically pick the correct format based on your import syntax.

Next Steps

Configuration

Learn about all available config options

Quick Start

Get a working widget in 5 minutes