Automate Flows w/ Troy

Analytics Drag and Drop Dashboard

Dashboards 4

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} />;
}

Dependencies

More by Automate Flows w/ Troy

View all
  • Business/Sales Dashboard

    Business/Sales Dashboard

    1.5K
  • Adjustable Glass Dashboard

    Adjustable Glass Dashboard

    1.3K
  • Interactive Workflow Blueprint

    Interactive Workflow Blueprint

    697
  • Glassy Coverflow Carousel

    Glassy Coverflow Carousel

    447
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    425
  • Liquid Glass Footer

    Liquid Glass Footer

    277
  • Dimensional Workflow Hero

    Dimensional Workflow Hero

    202
  • KNOCKOUT Landing Page

    KNOCKOUT Landing Page

    191

More in Dashboards

View all
  • Fernly — Project Management Dashboard with Kanban

    Fernly — Project Management Dashboard with Kanban

    641
  • Analytics Dashboard

    Analytics Dashboard

    57
  • Creator Dashboard

    Creator Dashboard

    205
  • Insights Dashboard

    Insights Dashboard

    32
  • serf dashboard

    serf dashboard

    136
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.7K
  • Corbel — Sales Analytics Dashboard

    Corbel — Sales Analytics Dashboard

    253
  • Admin Dashboard Cards

    Admin Dashboard Cards

    36