Vue templateFree

Analytics Dashboard

Web analytics dashboard template for Vue 3 and Tailwind CSS: SVG area chart, metric tabs, top pages, sources, a devices donut and a date range picker.

by Vueplayv1.0.0Updated 2 hours ago

Install
Full screen ↗

About this template

A privacy-friendly style analytics page in the shape people expect: headline metrics across the top that double as chart tabs, a large visitors area chart, then top pages, top sources and a devices breakdown underneath.

Pick a range (24 hours, 7, 30 or 90 days) from the accessible listbox and every number updates: the chart, the period-over-period deltas, the ranked lists and the donut. The sample data is generated deterministically in src/data.ts behind a single getReport(range) function, so connecting a real backend means replacing one function.

Charts are hand-written SVG with no library: a monotone curve that never overshoots, gridlines on friendly values, x labels that thin out on small screens, and hover plus arrow-key inspection with a tooltip. Sky blue is the only accent colour, so rebranding is a quick search and replace.

  • Metric tabs (visitors, pageviews, bounce rate, visit duration) with period-over-period change
  • Responsive SVG area chart with hover and keyboard tooltips
  • Date range listbox that regenerates all sample data
  • Top pages and sources bar lists, devices donut with legend
  • Live visitors indicator, light and dark mode

Code

18 files in the repo
<script setup lang="ts">
import { computed, ref } from 'vue'
import { getReport, ranges, type MetricId, type RangeId } from './data'
import DevicesDonut from './components/DevicesDonut.vue'
import MetricTabs from './components/MetricTabs.vue'
import RangePicker from './components/RangePicker.vue'
import SiteHeader from './components/SiteHeader.vue'
import TopList from './components/TopList.vue'
import TrafficChart from './components/TrafficChart.vue'

const range = ref<RangeId>('30d')
const metric = ref<MetricId>('visitors')

// Swap getReport for a fetch to your analytics API; the UI only depends on the Report shape.
const report = computed(() => getReport(range.value))
const metricLabel = computed(() => report.value.metrics.find(m => m.id === metric.value)?.label ?? '')
const rangeLabel = computed(() => ranges.find(r => r.id === range.value)?.label.toLowerCase() ?? '')
const visitors = computed(() => report.value.metrics.find(m => m.id === 'visitors')?.value ?? 0)
</script>

<template>
  <div class="min-h-screen bg-gray-50 text-gray-900 antialiased dark:bg-gray-950 dark:text-gray-100">
    <SiteHeader site="fernhollow.example" :live-visitors="report.liveVisitors" />

    <main class="mx-auto max-w-6xl space-y-6 px-4 py-8 sm:px-6">
      <div class="flex flex-wrap items-end justify-between gap-4">
        <div>
          <h1 class="text-2xl font-semibold tracking-tight text-gray-900 dark:text-white">Traffic overview</h1>
          <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Compared with the previous {{ rangeLabel.replace('last ', '') }}.</p>
        </div>
        <RangePicker v-model="range" />
      </div>

      <section class="overflow-hidden rounded-2xl border border-gray-200 bg-white shadow-xs dark:border-white/10 dark:bg-gray-900">
        <MetricTabs v-model="metric" :metrics="report.metrics" panel-id="traffic-panel" />
        <div id="traffic-panel" role="tabpanel" :aria-labelledby="`tab-${metric}`" class="px-3 pt-5 pb-3 sm:px-5">
          <TrafficChart :series="report.series" :metric="metric" :label="metricLabel" />
        </div>
      </section>

      <div class="grid gap-6 lg:grid-cols-3">
        <TopList title="Top pages" item-label="Page" :rows="report.pages" mono />
        <TopList title="Top sources" item-label="Source" :rows="report.referrers" />
        <DevicesDonut :devices="report.devices" :visitors="visitors" />
      </div>

      <p class="pt-2 text-center text-xs text-gray-400 dark:text-gray-500">Showing sample data for a fictional site. Hover or use the arrow keys on the chart to read exact values.</p>
    </main>
  </div>
</template>
All dashboards →
Preview of Admin Dashboard$29

Template · Dashboards

Admin Dashboard

A complete Vue 3 admin dashboard template with a collapsible sidebar, hand-drawn SVG charts, a sortable customers table and settings. Tailwind CSS, dark mode.

by Vueplay
Preview of Settings PageFree

Template · Dashboards

Settings Page

Account settings template for Vue 3 and Tailwind CSS with section nav, profile and account forms, notification toggles, billing and a floating save bar.

by Vueplay
Preview of 404 Not Found PageFree

Template · Error pages

404 Not Found Page

Friendly Vue 3 404 page with a drawn compass illustration, live search suggestions and helpful links, plus a compact 500 error variant. Tailwind CSS.

by Vueplay
Preview of App LandingFree

Template · Landing pages

App Landing

Vue 3 landing page for a mobile app with a CSS-drawn phone mockup, feature highlights, a screenshot strip and download buttons. Tailwind CSS, dark mode.

by Vueplay

Pro feature

Upgrade to Pro

Upgrade to unlock more of Vueplay. Cancel any time.

  • Custom domains with HTTPS
  • Private projects
  • No "Made with Vueplay" badge
  • GitHub sync

$120/year

Compare plansBilling settings