Ballmac UI home

Analytics 1: product analytics

A product analytics page that reads like a report: four metrics with their change and trend, the visit-to-purchase funnel with the biggest drop flagged, a tabbed ranking of pages, sources and countries, and a device split.

State

The normal view. Pick a state to see what the block shows while it loads, is empty or fails.

Open in v0 (opens in a new tab)

Installation

$ pnpm dlx shadcn@latest add @ballmac/analytics-1

Usage

Example: analytics-1-demo.tsx
"use client"

import { Analytics1 } from "@/components/ballmac/blocks/analytics-1/analytics-1"

export default function Analytics1Demo() {
  return <Analytics1 />
}

States

Pass state and the block does the rest: skeletons that match its layout, a clear empty message, an error you can retry, and announcements for screen readers.

  • Loading

    Skeleton metrics and charts under the real heading, announced as loading.

    state="loading"
  • No data for this period

    Says there is no data for the period; emptyState sets the copy.

    state="empty"
  • Could not load

    An alert saying nothing was changed, with Try again (onRetry).

    state="error"

Dependencies

Use with AI

Product analytics. <Analytics1 title description periods={[{ id, label, metrics, funnel, lists, devices }]} defaultPeriod onPeriodChange={(id) => void} />. Each period carries four metrics ({ label, value, change, series }), funnel steps, ranked lists for the tabs and device segments. Switching the period swaps every part. The period is a radio group; the ranking is a tablist with arrow keys. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Analytics 1: product analytics (@ballmac/analytics-1) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • The overview page of an analytics or growth tool
  • A report a founder reads every morning

Not for

  • Operational health; use reliability-1
  • Revenue and billing detail; use cost-1 or dashboard-1

Registry JSON: https://ui.ballmac.com/r/analytics-1.json

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.