Componentdata0.97 KB gzipZero dependencies
Stats Overview
Overview layout: KPI tile row, mini bar chart panel and recent records table.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add stats-overviewOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { StatsOverview } from "@/components/ui/stats-overview"; <StatsOverview />Source code
stats-overview.tsx + 1 helperZero 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 />| Prop | Type | Description |
|---|---|---|
| tiles | { label: string; value: string | number; delta?: { value: string; up: boolean }; spark?: number[] }[] | Configures tiles. (Default: []) |
| tableTitle | string | Configures table title. (Default: "Recent records") |
| tableRows | { label: string; value: string }[] | Configures table rows. (Default: []) |