Componentdata0.97 KB gzipZero dependencies

Stats Overview

Overview layout: KPI tile row, mini bar chart panel and recent records table.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add stats-overview

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { StatsOverview } from "@/components/ui/stats-overview"; <StatsOverview />

Source code

stats-overview.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxstats-overview.tsx76 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface StatsOverviewProps extends React.HTMLAttributes<HTMLDivElement> {  tiles?: { label: string; value: string | number; delta?: { value: string; up: boolean }; spark?: number[] }[];  tableTitle?: string;  tableRows?: { label: string; value: string }[];} /** Dashboard overview layout: top KPI tiles + mini table + chart slot. */export function StatsOverview({ tiles = [], tableTitle = "Recent records", tableRows = [], className, ...props }: StatsOverviewProps) {  return (    <div className={cn("space-y-4", className)} {...props}>       <div className="grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4">        {tiles.map((t, i) => (

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { StatsOverview } from "@/components/ui/stats-overview"; <StatsOverview />
PropTypeDescription
tiles{ label: string; value: string | number; delta?: { value: string; up: boolean }; spark?: number[] }[]Configures tiles. (Default: [])
tableTitlestringConfigures table title. (Default: "Recent records")
tableRows{ label: string; value: string }[]Configures table rows. (Default: [])