Subtlyv0.1.1
Start here

Installation

Subtly is published on npm. Add it to your project and import only the helpers you need.

npm install subtly

Initialize 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/dom
import { 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>

Search Subtly documentation

Popular pages
↑↓ to navigate↵ to openESC to close