Vue 3
Composition API and templates.
Install
Mount one root component and place your app inside it.
npm install subtlyInitialize
App.vue
<script setup> import { ref, onMounted, onBeforeUnmount } from "vue"; import { createInteractions } from "subtly"; const root = ref(null); let ix; onMounted(() => { ix = createInteractions({ root: root.value }); ix.start(); }); onBeforeUnmount(() => ix?.stop());</script><template ><main ref="root"><slot /></main></template>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
Use nextTick for conditional floating content; native custom events can be wired on actual elements.
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.