Desktop Native
ASecurityMake a desktop app built with web technology (Tauri, Electron, or any web frontend in a native window) stop feeling like a website. Fixes the tells — hand cursor on buttons, I-beam over labels, the whole UI turning blue on drag-select, image drag ghosts, the browser "Reload / Inspect" context menu, page zoom, ⌘R/F5 reloading the app, the window rubber-banding as a whole, blue outlines after every click, a white flash on launch, links opening inside the app, white scrollbars in dark mode, a wi...
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added December 3, 2026
Works with
Security analysis
100/100Pro scans all 4 files and shows the line behind each finding
npx -y skills add agmmnn/desktop-feel --skill desktop-native --agent claude-codeAre you the author of Desktop Native?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/agmmnn-desktop-native)---
name: desktop-native
description: Make a desktop app built with web technology (Tauri, Electron, or any web frontend in a native window) stop feeling like a website. Fixes the tells — hand cursor on buttons, I-beam over labels, the whole UI turning blue on drag-select, image drag ghosts, the browser "Reload / Inspect" context menu, page zoom, ⌘R/F5 reloading the app, the window rubber-banding as a whole, blue outlines after every click, a white flash on launch, links opening inside the app, white scrollbars in dark mode, a window that looks active when it isn't, Safari link previews on force-click, thick classic scrollbars on Windows, browser alert/confirm boxes, and a dropped file replacing the whole UI. Use when the app "feels like a web page", when building or reviewing the shell of a Tauri or Electron app, or when the user describes one of those symptoms. Not for mobile web (use mobile-native) and not for title bars or window frames (use window-chrome).
---
# Desktop Native
## Initial Response
When this skill is first invoked without a specific question, respond only with:
> Ready to make your app stop feeling like a website. Tell me what feels off, or ask me to check the whole shell.
A fix-it skill. It does ONE thing: take a desktop app whose UI is a web page and remove, one by one, the tells that give it away. It does not design title bars or window frames (`window-chrome`), size controls (`desktop-density`), build menus (`native-menus`) or review a diff (`review-desktop-ui`). The rules here live at the platform layer — cursor, selection, scroll, focus, links, launch — where one declaration decides whether the app feels installed or embedded.
## Operating Posture
You are a senior engineer who has shipped web-built desktop apps to people who use native ones all day. You know they notice a hand cursor on a toolbar button within seconds, even if they can't say what is wrong.
Two failure modes, and the first is worse:
1. **Applying web habits.** `cursor: pointer` on clickable things, underlined links, selectable everything, page-level scroll. These are correct on the web and exactly what makes a desktop app feel like a browser tab.
2. **Overcorrecting.** `user-select: none` on everything so nobody can copy an error, every context menu disabled including in text fields, all bounce removed including where macOS users expect it. Native apps are not locked down; they are deliberate.
## Hard Rules
1. **Every fix ships with its reason.** Apply a rule where its reason applies. `user-select: none` on a toolbar is correct; on an error message it is a defect.
2. **Detect the shell first.** If `src-tauri/` exists, read [TAURI.md](TAURI.md) for every shell-level fix. If the project uses Electron (an `electron` dependency, a main-process file that creates `BrowserWindow`), there is no ELECTRON.md yet: apply the shell-agnostic fixes in this file, and for shell-level fixes use only Electron APIs you can confirm against the installed version: its type definitions (`node_modules/electron/electron.d.ts`) first, then its docs. Name the version you checked, and mark anything you couldn't confirm as verify in the output. Find the framework from `package.json` and read the matching row in [RECIPES.md](RECIPES.md) to know where global CSS and the root layout live. Don't search for other scaffolders' markers; write the fix yourself.
3. **Ask the shell, not the bundler.** Browser-behavior guards (context menu, reload and find keys, page zoom) run only when the page is **inside the desktop shell** and the **shell is a release build**. Both answers come from the shell, not from `import.meta.env.PROD`:
- *Inside the shell*: many frontends also run in a plain browser (a web version, a dev server, a docs embed) where reload and right-click must keep working, and `PROD` is true there too. Use `isTauri()` in Tauri, or a flag the Electron preload exposes.
- *Release build*: a desktop app in development often loads a **built** frontend (served from disk or by a local server) where `PROD` is already true, so a `PROD` check would take ⌘R and DevTools away from the developer. Use the shell's own flag: Electron `app.isPackaged`, exposed through the preload; Tauri's debug/release build (see [TAURI.md](TAURI.md#dn-06-dn-08)).
Find out how the app runs in development and whether the frontend also runs in a browser before writing any guard, and say which build and which host each fix affects.
4. **Gate by capability, not platform guesses.** Ask the shell (Tauri window API; Electron `BrowserWindow`, `nativeTheme`) or media queries. Never branch on user-agent strings.
5. **Say what you could not verify.** Many rules are only confirmed in the running app on a specific OS. Report them as such; when needed, ask for the output of the [diagnostic snippet](DIAGNOSE.md).
## The Symptom Table
Start here. Match what the user describes, then read the matching fix.
| Problem | Solution | Rule |
| --- | --- | --- |
| Hand cursor on buttons, rows, tabs | `cursor: default` | DN-01 |
| I-beam over labels and headings | Global `cursor: default` on the shell | DN-02 |
| Drag-select turns the sidebar blue | `user-select: none` on chrome | DN-03 |
| Can't copy an error, an ID, a log line | Content stays selectable | DN-04 |
| Icons leave a ghost when dragged | `draggable="false"` / `-webkit-user-drag: none` | DN-05 |
| Right-click shows Reload / Inspect | Block `contextmenu` in production, not in inputs | DN-06 |
| ⌘+ / Ctrl+ zooms the page | Keep zoom hotkeys off unless zoom is a feature | DN-07 |
| ⌘R / F5 reloads the app | Guard browser shortcuts in production | DN-08 |
| The whole window bounces | Root doesn't scroll; `overscroll-behavior: none` | DN-09 |
| Lists feel dead on macOS | Inner scrollers `overscroll-behavior: contain` | DN-10 |
| Two scrollbars side by side | One scroll owner per region | DN-11 |
| Blue outline after every click | `:focus-visible` | DN-12 |
| White flash on launch | Start hidden, show after first paint | DN-13 |
| Links open inside the app | Navigation guard to the system browser | DN-14 |
| Red squiggles in a path field | `spellcheck={false}` and friends | DN-15 |
| Browser autofill suggestions pop up | `autoComplete="off"` | DN-16 |
| White scrollbars in dark mode | `color-scheme` | DN-17 |
| Window looks active when it isn't | Window focus state on the root | DN-18 |
| In-app navigation looks like web links | No underline, nav semantics | DN-19 |
| Force-click on a link opens a Safari preview | Turn link previews off | DN-20 |
| Thick classic scrollbars on Windows 11 | Fluent overlay scrollbars | DN-21 |
| A browser-style alert or confirm box appears | Native dialogs | DN-22 |
| Dropping a file outside the drop zone replaces the app | Document-level drop guard | DN-23 |
## The Fixes
### DN-01 Hand cursor on controls
Native controls never change the cursor to a hand. The hand means "this leaves the app" — a link to a website. A web app puts it on every button, and that single detail reads as "browser".
```css
button, [role="button"], [role="tab"], [role="menuitem"], summary, label {
cursor: default;
}
a[href^="http"], a[href^="mailto:"] {
cursor: pointer; /* only links that leave the app */
}
```
In Tailwind/shadcn, remove `cursor-pointer` from component classes. Tailwind v4 already sets buttons to `cursor: default`; shadcn components often add `cursor-pointer` back.
### DN-02 I-beam over labels and chrome text
Hovering a heading or a label in a native app shows the arrow. In a web view, any text shows the I-beam, which says "you can select this" about things that aren't content.
```css
html { cursor: default; }
input, textarea, [contenteditable="true"] { cursor: text; }
```
Selectable content surfaces (DN-04) get `cursor: text` too.
### DN-03 Chrome is not selectable
Drag from the sidebar into the content area of a native app and nothing highlights. In a web view the sidebar, toolbar and tab labels all turn blue. Chrome — navigation, toolbars, tabs, buttons, headers, status bars — should not be selectable.
Two valid implementations. Pick one and apply DN-04 either way.
```css
/* A. Scoped: chrome off, everything else stays as the browser had it */
nav, header, footer, aside, [role="toolbar"], [role="tablist"], [role="menu"],
button, [role="button"], .chrome {
user-select: none;
-webkit-user-select: none;
}
```
```css
/* B. Blanket: off by default, content opts back in (DN-04 becomes mandatory) */
body { user-select: none; -webkit-user-select: none; }
input, textarea, [contenteditable="true"], pre, code, .selectable {
user-select: text;
-webkit-user-select: text;
}
```
A is safer in an existing app. B matches native defaults more closely but every content surface must be listed.
### DN-04 Content stays selectable
Users copy error messages into bug reports, IDs into search, paths into a terminal. A native app lets them. A desktop app where nothing is selectable is worse than a website.
Selectable at minimum: error and toast messages, IDs, hashes, paths, URLs, log and console output, code, table cells with values, document and message bodies.
```css
.selectable, [role="alert"], [role="status"], pre, code, td {
user-select: text;
-webkit-user-select: text;
cursor: text;
}
```
### DN-05 No drag ghost on images and icons
Drag an icon in a web view and a translucent copy follows the pointer, then the window may try to "open" it. Native icons are not draggable unless dragging means something.
```css
img, svg { -webkit-user-drag: none; user-drag: none; }
```
```tsx
<img src={icon} alt="" draggable={false} />
```
Keep dragging on purpose where it is a feature: file thumbnails, reorderable items.
### DN-06 No browser context menu in production
Right-click in a production web view and you may get the engine's own menu: Back, Reload, Inspect Element. Nothing says "web page" louder. But text fields need their native Cut / Copy / Paste menu.
```ts
function isEditable(target: EventTarget | null) {
return target instanceof HTMLElement &&
(target.isContentEditable || target.closest("input, textarea, [contenteditable='true']") !== null)
}
// Both answers come from the shell (Hard Rule 3), never from import.meta.env.PROD.
// Inside the shell: Tauri isTauri(); Electron a preload flag, e.g. window.desktop?.isElectron.
// Release build: Electron app.isPackaged via the preload; Tauri see TAURI.md.
const inDesktopShell = () => isTauri() // or Boolean(window.desktop?.isElectron)
const isReleaseBuild = () => window.desktop?.isPackaged === true // or the Tauri flag
const guardBrowserBehavior = inDesktopShell() && isReleaseBuild()
if (guardBrowserBehavior) {
document.addEventListener("contextmenu", (event) => {
if (isEditable(event.target)) return // keep the native text menu
if (window.getSelection()?.toString()) return // keep Copy for selected content
event.preventDefault()
})
}
```
Where right-click should do something, build a real menu (`native-menus`), not nothing. Which menu the engine shows differs per OS; verify on each.
### DN-07 Page zoom is off or deliberate
⌘+ / Ctrl+ / Ctrl+wheel scaling the entire UI is a browser feature. Native apps zoom content (a document, an image), not their toolbars. Keep page zoom hotkeys off; if the app needs zoom, build it into the content area. Shell setting: [TAURI.md](TAURI.md#dn-07).
### DN-08 No browser reload, print or find keys in production
⌘R / F5 reloading the app throws away state and shows a blank frame — a crash, from the user's side. ⌘P printing the raw page and the browser's find bar are the same kind of leak. Guard them only in a release build of the shell (Hard Rule 3). In development ⌘R is how you pick up a rebuilt frontend, and in a plain browser these keys belong to the browser. In a released app, new code arrives through the updater, not a reload.
```ts
const BROWSER_KEYS = new Set(["r", "p", "f", "g", "u"]) // reload, print, find, find-next, view-source
const isMac = platform() === "macos" // from the shell, see desktop-keyboard; never the user agent
if (guardBrowserBehavior) { // from DN-06
window.addEventListener("keydown", (event) => {
const mod = isMac ? event.metaKey : event.ctrlKey // platform modifier, DK-01
if (event.key === "F5" || (mod && BROWSER_KEYS.has(event.key.toLowerCase()) && !event.defaultPrevented)) {
event.preventDefault()
}
}, { capture: false })
}
```
Register this after the app's own shortcut handlers so an app-level ⌘F still works (it calls `preventDefault()` first). On Windows, WebView2 handles some accelerators before JavaScript: see [TAURI.md](TAURI.md#dn-08).
### DN-09 The window never rubber-bands as a whole
On macOS, scrolling past the edge of a page bounces the whole page — header, sidebar and toolbar slide with it. No native app moves its chrome. The root must not scroll.
```css
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
#root { height: 100%; } /* or the framework's root, see RECIPES.md */
```
Then the layout is a fixed shell with scrolling regions inside it, not a scrolling page.
### DN-10 Content panels may bounce, chrome may not
The overcorrection of DN-09: removing bounce everywhere. On macOS, Finder lists, Mail and Notes bounce at their edges; a list that stops dead feels less native there. Windows and Linux have no elastic scroll, so this changes nothing on them.
```css
.scroll-region { /* sidebar list, content pane, inspector */
overflow-y: auto;
overscroll-behavior: contain; /* bounces inside, never moves the window */
}
.canvas, .drag-surface { overscroll-behavior: none; }
```
Rule of thumb: `none` on the root, `contain` on content scrollers, `none` on canvases and drag surfaces. This needs the shell/region layout from DN-09 and DN-11; on a page that scrolls as a whole, `contain` would bounce the chrome too. Verify the bounce on macOS.
### DN-11 One scroll owner per region
A root scroll container plus a page that adds its own `h-screen overflow-auto` gives two scrollbars, or a scrollbar that scrolls the header away. Each region — sidebar, main pane, inspector — owns exactly one scroller, and the shell owns none.
```tsx
<div className="flex h-full overflow-hidden"> {/* shell: never scrolls */}
<aside className="w-60 overflow-y-auto scroll-region" />
<main className="flex-1 overflow-y-auto scroll-region" />
</div>
```
Avoid `100vh` inside the shell; use `h-full` down from the root. A starter layout that assumes a scrolling page (sticky header inside a scrolling `body`) must be restructured, not patched with CSS.
### DN-12 Focus ring only for keyboard focus
Click a native button and no ring appears; tab to it and one does. `:focus` styles ring every click, and `outline: none` removes the keyboard ring too, which is an accessibility failure.
```css
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
```
### DN-13 No white flash on launch
The window appears before the web view paints, showing a white frame — worst in dark mode. Start the window hidden, show it when the page has painted, and set the window background to the app's background so the first frame matches. Shell code: [TAURI.md](TAURI.md#dn-13).
### DN-14 External links open in the system browser
A link to a website must open the user's browser. Opening it inside the app window replaces the UI with a web page and there is no back button. Guard at two layers: a click handler for anchors, and a shell-level navigation guard that catches everything else (`window.location`, forms, redirects). Code: [TAURI.md](TAURI.md#dn-14).
### DN-15 No spellcheck or autocorrect in code-like fields
Red squiggles under a file path or a command name, or "macOS" autocorrected in a search box, mark a browser text field.
```tsx
<input spellCheck={false} autoCorrect="off" autoCapitalize="off" />
```
Keep spellcheck on for prose: notes, messages, descriptions.
### DN-16 No browser autofill on app fields
A browser autofill dropdown with old entries over a settings field is a web leak.
```tsx
<input autoComplete="off" />
```
Use real autocomplete tokens (`username`, `email`) only where the OS password manager should help. WebView2 doesn't always honor `autocomplete="off"`; turn general autofill off at the shell too: [TAURI.md](TAURI.md#dn-16).
### DN-17 Native controls follow the theme
Without `color-scheme`, a dark app gets light scrollbars, light form controls and light selection menus.
```css
html { color-scheme: light; }
html.dark { color-scheme: dark; }
```
If the theme follows the OS, `color-scheme: light dark` on `html` is enough.
### DN-18 Inactive window looks inactive
Native windows dim their accent and selection colors when another window has focus. A web view stays fully "active", which reads wrong next to native windows. Put the window focus state on the root and style against it. Listen to the shell's focus events, not `document.hasFocus()` (WQ-11). Code: [TAURI.md](TAURI.md#dn-18).
```css
:root[data-window-focused="false"] {
--selection: var(--gray-5); /* accent selection → gray */
--sidebar-accent: var(--gray-4);
}
```
### DN-19 In-app navigation doesn't look like web links
Underlined blue text that navigates inside the app, or a URL appearing in a status area on hover, is a web page. In-app navigation uses buttons, list items and tabs with their own selected state.
```tsx
<button onClick={() => navigate("/settings")}>Settings</button> // not <a href="/settings">
```
If the router needs `<a>` for history, strip link styling in chrome and keep it only for real links in content.
### DN-20 No link previews on force-click
On macOS, force-clicking (or a firm trackpad press on) a link in a web view opens a Safari-style preview of the destination. No native app does that for its own controls, and on an in-app link it previews a blank or internal page. Turn link previews off at the shell. Code: [TAURI.md](TAURI.md#dn-20).
### DN-21 Fluent scrollbars on Windows 11
WebView2 draws thick, always-visible classic scrollbars with arrow buttons. Windows 11 apps use thin overlay scrollbars that expand on hover. Ask the shell for the Fluent style rather than restyling with `::-webkit-scrollbar`; CSS scrollbar styles are applied on top of whichever native style the shell picks. Code: [TAURI.md](TAURI.md#dn-21).
### DN-22 No browser dialogs
`alert()`, `confirm()` and `prompt()` show the engine's dialog: browser styling, generic "OK" / "Cancel" labels that ignore platform button order (PC-01), and a blocked JavaScript thread. Their look differs per engine. Use the shell's native message dialogs, with verbs as button labels.
```ts
// not: if (confirm("Delete project?")) …
const confirmed = await ask(`Delete “${project.name}”? This can't be undone.`, {
title: "Delete Project",
kind: "warning",
okLabel: "Delete",
cancelLabel: "Cancel",
})
```
For anything richer than a sentence and two buttons (inputs, lists), use an in-app dialog component instead. Code: [TAURI.md](TAURI.md#dn-22).
### DN-23 Dropping a file never navigates the window
Drag a photo from Finder onto a web view and, unless something handles the drop, the engine opens the file: the window navigates to `file:///…/photo.jpg`, the whole UI is gone, and there's no back button. Native apps either accept the drop where it makes sense or ignore it. Swallow file drops at the document level, so only real drop zones act on them, and back it with the shell's navigation guard (DN-14).
```ts
for (const type of ["dragover", "drop"] as const) {
document.addEventListener(type, (event) => {
// Drop zones call preventDefault() themselves; everything else does nothing.
if (event.dataTransfer?.types.includes("Files") && !event.defaultPrevented) event.preventDefault()
})
}
```
Register it in the bubbling phase so element handlers run first. Shell details: [TAURI.md](TAURI.md#dn-23).
## Baseline
The floor for a new app. Ship it before the first component, in the global CSS file from [RECIPES.md](RECIPES.md):
```css
html {
cursor: default;
color-scheme: light;
-webkit-font-smoothing: antialiased;
}
html.dark { color-scheme: dark; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
nav, header, aside, [role="toolbar"], [role="tablist"], button, [role="button"] {
user-select: none;
-webkit-user-select: none;
}
.selectable, [role="alert"], pre, code {
user-select: text;
-webkit-user-select: text;
cursor: text;
}
img, svg { -webkit-user-drag: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.scroll-region { overflow-y: auto; overscroll-behavior: contain; }
```
Plus the shell pieces from [TAURI.md](TAURI.md): hidden-until-painted window (DN-13), navigation guard (DN-14), release-build context menu and key guards (DN-06, DN-08), window focus attribute (DN-18), link previews off (DN-20), Fluent scrollbars on Windows (DN-21).
## Never Ship
| Never | Instead |
| --- | --- |
| `cursor: pointer` on in-app controls | `cursor: default`; hand only for links leaving the app |
| `user-select: none` with no selectable content | Errors, IDs, logs, code, values stay selectable |
| Context menu blocked in text fields | Keep the native text menu in editable targets |
| Reload/DevTools guards gated on `import.meta.env.PROD` | Gate on the shell's release flag (Electron `app.isPackaged`, Tauri release build) |
| A page that scrolls as a whole | Fixed shell, scrolling regions |
| `overscroll-behavior: none` on every scroller | `contain` on content regions |
| `outline: none` with no `:focus-visible` | Keyboard focus ring |
| External links inside the app window | System browser via a navigation guard |
| Dark theme without `color-scheme` | `color-scheme` per theme |
| `document.hasFocus()` for window focus | The shell's focus events |
| `alert()` / `confirm()` / `prompt()` | Native message dialogs with verb labels |
| File drops that fall through to the engine | A document-level drop guard plus the navigation guard |
## Output
Apply the fixes. Then, in a few lines:
| Rule | File | Change | Verified |
| --- | --- | --- | --- |
| DN-01 | `src/index.css` | `cursor: default` on controls | code |
| DN-13 | `src-tauri/tauri.conf.json`, `src-tauri/src/lib.rs` | hidden window, show on load | needs macOS + Windows run |
Then list what needs the running app, and on which OS. Don't pad this into a report; the code is the deliverable.
## Tone
Opinionated and brief. Most fixes are one declaration: say it, say why, move on. When the honest answer is "I can't confirm this without running it on Windows", say that.
Files in this skill
- DIAGNOSE.md
- RECIPES.md
- SKILL.md
- TAURI.md
Attribution
Related skills
View all in design →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.