JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 17
  • Score
    100M100P100Q53562F
  • License MIT

JavaScript bindings for the undocumented SetWindowCompositionAttribute API

Package Exports

  • windows-swca

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (windows-swca) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

windows-swca

Wraps Windows 10's undocumented SetWindowCompositionAttribute API, which allows to render a window with a blurry, acrylic or transparent background effect.

Dependencies

This module only depends on a properly set up Windows build environment.

Screenshots

Note: all the applications showed above except Terminus do not use this module, they have been personally modified by me

Documentation

There's no fancy docs website for now, but every publically facing API component is documented using JSDoc, so a quick look in the source or your IDE's autocomplete and info tips should give you all need.

Tips for usage on Electron

Don't forget to install electron-rebuild from NPM if not already done and to run npx electron-rebuild after installing to avoid ABI version mismatch issues.

For best user and developer experience, do not set transparent to true in your browser create options. It has many shortcomings, such as no support for maximised window state and shadows. Instead set backgroundColor to #00000000.

Setting frame to false and creating custom window decorations is also recommended, the selected transparency effect will bleed over native window decorations if not.