Astro
Static pages, islands and client navigation.
Install
Place the script in the shared layout; use HTML attributes in .astro files or hydrated islands.
npm install subtlyInitialize
src/layouts/Layout.astro
<script> import { createInteractions } from 'subtly'; const ix = createInteractions(); ix.start(); // The runtime observes document mutations during client navigation. if (import.meta.hot) import.meta.hot.dispose(() => ix.stop());</script>Use a behavior
<div data-ix="hover-intent" data-ix-hover-delay="150"> <button type="button">Preview</button></div>Use the shared HTML attributes, or import programmatic helpers inside your framework lifecycle. State and visual rendering stay in your component.
Lifecycle and accessibility
Avoid duplicate runtimes when using client-side navigation. Keep an app-wide instance or explicitly stop it before mounting another.
Use a single runtime per root; do not overlap roots. Keep native button semantics, focus and click support. For cleanup, call each utility’s returned callback or destroy method.
Try the same behavior
A clearer home for your next release.
In progressPreview closed. Hover, focus or click to open.
The live example uses native JavaScript; the framework snippets are integration recipes, not separately compiled framework applications.