Start here
Installation
Subtly is published on npm. Add it to your project and import only the helpers you need.
npm install subtlyInitialize the HTML behaviors
import { createInteractions } from 'subtly';
import 'subtly/styles.css'; // optional structural styles
const interactions = createInteractions();
interactions.start();
// At application teardown:
interactions.stop();Use a standalone utility
Utilities can be imported directly when you need programmatic control.
import { hoverIntent, debounce } from 'subtly';Optional floating positioning
The floating helper uses Floating UI as an optional peer dependency. Install it only when using that helper.
npm install @floating-ui/domimport { floating } from 'subtly/floating';Without a bundler
Copy the src/ directory into your site and use native module imports. Serve the site over HTTP so browser modules can load.
<script type="module">
import { createInteractions } from "./interactions/index.js";
const interactions = createInteractions();
interactions.start();
</script>