jQuery,
reimagined
for the modern web.
A familiar chainable API powered by modern Web APIs. Lightweight, modular, ESM-first and built for today's browsers. The power you remember, the platform you have now.
npm install flash.js
import { F } from "flash.js";
F(".button")
.addClass("active")
.on("click", () => {
F(".message").text("Hello, FLASH.js!");
});
Familiar. Modern. Fast.
jQuery's DX without jQuery's weight. Every interaction below runs on real FLASH.js — inspect the source, it's dogfooded.
Familiar API
F(".card").addClass("active") — chaining, selectors, traversal you already know.
Modern Web APIs
Native fetch, classList, CustomEvent, Observers — no shims.
Zero Dependencies
Single file, no peer deps. Works via CDN, ESM, or CJS.
flash.js — 6—8 KB gzip
Tree-Shakable
import { http } from "flash.js/http" — only what you use is bundled.
ESM First
sideEffects: false + subpath exports. Vite / Rollup / esbuild ready.
TypeScript Ready
Full flash.d.ts with FlashCollection generics and overloads.
Live code — real FLASH.js, no fakes.
Every snippet executes against the actual library. Open DevTools — no jQuery, no duplicate abstraction.
F(".card").addClass("active");
F("#app").html("<h1>Hello</h1>");
F(".item").attr("data-ready","true").css({ opacity: 1 });
F("button").on("click", handler);
F(document).on("click", ".btn", handler); // delegation
F("button").trigger("custom:event", { detail: 123 });
const user = await F.http.json("/api/user/42");
const res = await F.http.get("/api/data", { timeout: 5000 });
await F.http.post("/api/user", JSON.stringify({ name: "Ada" }));
—
F.storage.set("theme", "dark");
F.storage.get("theme"); // "dark"
F.storage.session.set("draft", { ... });
await F("#box").animate(
{ opacity: [0,1], transform: ["translateY(8px)","translateY(0)"] },
{ duration: 300, easing: "ease-out" }
);
await F("#box").fadeIn(); // or fadeOut / slideDown / slideUp
F.toast("Saved!", "success");
await F.alert("Done", "FLASH.js");
const ok = await F.confirm("Delete?", "Confirm");
F.loading(true); await work(); F.loading(false);
await F.modal({ title:"Hello", message:"...", actions:[...] })
Designed for the web that exists today.
FLASH.js doesn't repackage old shims. It composes the platform: querySelectorAll, classList, fetch, AbortController, CustomEvent, MutationObserver, Web Animations API — with a chainable DX you already know.
npm install flash.js
# CDN
<script src="https://unpkg.com/flash.js/dist/flash.min.js"></script>
<script>F.toast("hello")</script>