About
A glass analytics dashboard with 28 cards across Analytics, Audience, Revenue, and Retention. Drag charts and metrics with a mouse or touch, or reorder them with the keyboard. Each page remembers its layout on this device.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Analytics Drag and Drop Dashboard to your project and fits it to your theme.
Code
How Analytics Drag and Drop Dashboard is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import { useEffect, useState } from "react";
import { AnalyticsDragDropDashboard } from "@/components/ui/analytics-drag-and-drop-dashboard";
const settings = {
brand: "Insights",
respectReducedMotion: true,
};
export default function DashboardDemo(props: Partial<typeof settings>) {
const { brand, respectReducedMotion } = { ...settings, ...props };
const [theme, setTheme] = useState<"light" | "dark">("light");
useEffect(() => {
const host = document.documentElement;
const preference = window.matchMedia("(prefers-color-scheme: dark)");
const readTheme = () => {
const query = new URLSearchParams(window.location.search).get("theme");
if (query === "dark" || query === "light") {
setTheme(query);
return;
}
const mode = host.dataset.theme || document.body.dataset.theme;
if (mode === "light" || mode === "dark") {
setTheme(mode);
return;
}
const dark = [host, document.body].some((node) => node.classList.contains("dark"));
const light = [host, document.body].some((node) => node.classList.contains("light"));
setTheme(dark || (!light && preference.matches) ? "dark" : "light");
};
readTheme();
const observer = new MutationObserver(readTheme);
[host, document.body].forEach((node) =>
observer.observe(node, { attributes: true, attributeFilter: ["class", "data-theme"] }),
);
preference.addEventListener("change", readTheme);
return () => {
observer.disconnect();
preference.removeEventListener("change", readTheme);
};
}, []);
return <AnalyticsDragDropDashboard brand={brand} theme={theme} respectReducedMotion={respectReducedMotion} />;
}
















