popcalc.js

Pop a realistic fake calculator in the browser. Zero dependencies.

Drag the title bar · Use keyboard · Click close to dismiss

Usage

// Load from CDN
<script src="https://lude.rs/popcalc.js/popcalc.js"></script>

// Or self-host
<script src="popcalc.js"></script>

// Pop a calculator (auto-detects OS and theme)
popcalc()

// Force a specific skin
popcalc({ os: 'windows11' })
popcalc({ os: 'sequoia' })

// Force dark mode
popcalc({ os: 'windows11', theme: 'dark' })

// Custom position
popcalc({ x: 100, y: 50 })

// Programmatic close
const calc = popcalc()
calc.close()

Skins

SkinOSTheme
windows11Windows 11Light / auto-dark
windows10Windows 10Light / auto-dark
macosmacOS (Yosemite - Sonoma)Always dark
sequoiamacOS 15+ SequoiaAlways dark
linuxGNOME 45+Light

Auto-detection uses navigator.platform and UA string parsing. Windows dark mode follows prefers-color-scheme.