Back to Home
Simple Snap Layout Overlay for Tauri v2

Simple Snap Layout Overlay for Tauri v2

B
Blizine Admin
·2 min read·0 views

HyphenM Posted on May 31 Simple Snap Layout Overlay for Tauri v2 # tauri # rust # webdev # webview Firstly, hello everyone who reads this. I made a little plugin for Tauri v2 to easily enable the Windows 11 snap layout overlay when running your app in decoration-free (borderless) mode. I wanted a sleek and custom look without losing Windows 11 functionality, but I couldn't find an existing solution that quite did it for me. Quick how it works. It tracks a specific HTML element ID on your frontend, gets its dimensions, and creates a transparent native overlay. This tricks Windows 11 into bringing up the native snap layout when a user hovers over your custom maximize button. Just want to try it? Here's the github. 👉 tauri-plugin-snap-layout Storytime So ... why? I'm trying to build sort of a productivity helper for the things I'm interested in making (rather than actually making those things because who does that?). I wanted it to be borderless an minimalist. However, I quickly found an issue with that on Windows: if you disable native window decorations in Tauri, you lose access to the Windows 11 snap layout overlay. I looked around, asked AI, and found awesome projects like tauri-plugin-decorum and tauri-plugin-frame . I couldn't work decorum for some reason, I couldn't say why. Frame worked mostly how I wanted it, but I had to tinker in its code to get it exact. Worried that updates might break my prodding and poking, I decided to build a focused solution that handles just this one job precisely. I am not a programmer person. Definitely not a professional one at least. I've messed around with game making, customizing existing things here and there, but never released anything. I pretty frankensteined the hell out of bits of frame and my limited understanding. Full disclosure: I used AI to refactor the code and catch edge cases. It claimed to remove deadlocks, race conditions, and unused code. Did it? I couldn't say, but I definitely hope so! The development cycle

📰Dev.to — dev.to

Comments