SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

On this page

escapeLink

Why JS: a page-wide Escape shortcut needs a key listener.

tsx
import { escapeLink } from "@sdxc/ui/app";

Usage

Clicks the host <a> on an unclaimed Escape, so navigation, prefetch and frame targeting stay the link's own. The listener sits on the document in the bubble phase, which lets any handler that stops the key earlier (a selection bar clearing its rows) keep it.

Signature

typescript
escapeLink(): MixinDescriptor<HTMLAnchorElement>

Examples

tsx
<a href={clearHref} mix={[escapeLink()]}>Clear filters</a>
@sdxc/ui

Can’t find it? Contact us