Tiny, dependency-free JavaScript widgets that add interactive “bubbles” to any website — such as credits, contact forms, or feedback prompts.
Built in vanilla JS.
- Zero dependencies — lightweight and fast.
- Drop-in ready — use via
<script>tag or ES module import. - Auto-injected styles — no need to import CSS.
- Customizable — change position, text, and behavior.
- Includes:
CreditBubble— hover bubble that expands to show text.ContactBubble— feedback/contact form bubble (uses EmailJS or custom logic).
Add this anywhere in your HTML:
<script src="https://cdn.jsdelivr.net/npm/isa-bubbles@latest/dist/isa-bubbles.min.js"></script>
<script>
// example: credit bubble
const credit = new CreditBubble({ text: "🍁" });
// example: contact form bubble
const contact = new ContactBubble({
textCollapsed: "✉️",
textExpanded: "Send feedback ✉️",
});
</script>Install via npm:
npm install isa-bubblesThen import and use in your code:
import { CreditBubble, ContactBubble } from "isa-bubbles";
// Credit bubble
new CreditBubble({
text: "🍁",
});
// Contact bubble
new ContactBubble({
textCollapsed: "✉️",
textExpanded: "Send feedback ✉️",
});| Option | Type | Default | Description |
|---|---|---|---|
text |
string | "🍁" |
Collapsed text or emoji |
hoverText |
string | "made in 🍁" |
Text shown on hover |
right |
string | "10px" |
Position from right |
bottom |
string | "20px" |
Position from bottom |
onClick |
function | undefined |
Callback when clicked |
| Option | Type | Default | Description |
|---|---|---|---|
textCollapsed |
string | "✉️" |
Collapsed text |
textExpanded |
string | "send feedback ✉️" |
Expanded text |
right |
string | 85px |
(Optional) Position right |
bottom |
string | 20px |
(Optional) Position bottom |
Clone and run locally:
git clone https://github.com/LuisaTu2/isa-info-bubble.git
cd isa-info-bubble
npm install
npm run buildThen open index.html in your browser to test locally.
The repo supports two builds:
ES Module → for import usage
IIFE (UMD) → for <script> tag usage via CDN
Bundle using Rollup (recommended):
npm run buildOutput files:
dist/isa-bubbles.min.js — browser-ready script
src/ — ESM version
This project started as a small experiment to publish a reusable UI widget on npm. It grew into a learning experience on:
-
npm publishing workflow
-
ESM vs UMD builds
-
style injection for JS components
-
making something both “plug & play” and modern
MIT © 2025 Luisa P