Package Manager
Install via npm or any compatible package manager:CDN / Script Tag
For sites without a build system, load the widget directly from a CDN:VizochokWidget constructor.
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:
@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 themodulefield inpackage.json. - UMD (
vizochok-widget.umd.js) — for script tags and legacy bundlers. Referenced via themainfield inpackage.json.
Next Steps
Configuration
Learn about all available config options
Quick Start
Get a working widget in 5 minutes