Application
Dashboard Showcase
Composed dashboard demo — sidebar, KPI cards, charts, and a deals table in one frame.
MotionfadeUp on the shell; children own their motion
Install
Install Kineto and follow the theme setup once in your app.
bash
npm install kinetotsx
import { DashboardShowcase } from "kineto/dashboard-showcase";Preview
My Dashboard
Welcome back, Esther
Search…
EHOverview
Balance
$0
27.4%vs last month
Spending
$0
10%vs last month
Investing
$0
4.2%vs last month
Income vs Expense
Last 6 months
Income Expense
Spend by category
$3KTotal
- Essentials45%
- Investments25%
- Subscriptions30%
Recent deals
AB Arif Billah @arifbillah | Complete | $4,570 | Jul 21 |
SK Sarah Kim @sarahk | In process | $2,300 | Jul 20 |
DC David Chen @dchen | Complete | $8,120 | Jul 19 |
LP Liam Patel @liamp | Pending | $1,040 | Jul 18 |
tsx
"use client";
import * as React from "react";
import { motion, type HTMLMotionProps } from "motion/react";
import {
Bell,
CreditCard,
Home,
LayoutGrid,
Search,
Settings,
TrendingUp,
Users,
Wallet,
} from "lucide-react";
import { cn } from "@/lib/cn";
import { fadeUp, viewportOnce } from "@/lib/motion-presets";
import { Badge } from "@/components/ui/badge";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { SegmentedControl } from "@/components/ui/segmented-control";
import { Sidebar } from "@/components/application/sidebar";
import { StatCard, StatGrid } from "@/components/application/stat-card";
import { AreaChart } from "@/components/charts/area-chart";
import { DonutChart } from "@/components/charts/donut-chart";
import { DataTable, type DataTableColumn } from "@/components/application/data-table";
interface DealRow {
name: string;
handle: string;
status: "Complete" | "In process" | "Pending";
amount: string;
date: string;
}
const deals: DealRow[] = [
{ name: "Arif Billah", handle: "@arifbillah", status: "Complete", amount: "$4,570", date: "Jul 21" },
{ name: "Sarah Kim", handle: "@sarahk", status: "In process", amount: "$2,300", date: "Jul 20" },
{ name: "David Chen", handle: "@dchen", status: "Complete", amount: "$8,120", date: "Jul 19" },
{ name: "Liam Patel", handle: "@liamp", status: "Pending", amount: "$1,040", date: "Jul 18" },
];
const statusVariant = {
Complete: "success",
"In process": "warning",
Pending: "secondary",
} as const;
const columns: DataTableColumn<DealRow>[] = [
{
key: "customer",
header: "Customer",
cell: (row) => (
<div className="flex items-center gap-3">
<Avatar className="size-8">
<AvatarFallback className="text-xs">
{row.name
.split(" ")
.map((p) => p[0])
.join("")}
</AvatarFallback>
</Avatar>
<div className="leading-tight">
<p className="font-medium text-foreground">{row.name}</p>
<p className="text-xs text-muted-foreground">{row.handle}</p>
</div>
</div>
),
},
{
key: "status",
header: "Status",
cell: (row) => (
<Badge variant={statusVariant[row.status]} dot>
{row.status}
</Badge>
),
},
{ key: "amount", header: "Amount", align: "right", cell: (row) => (
<span className="font-medium tabular-nums">{row.amount}</span>
) },
{ key: "date", header: "Date", align: "right", cell: (row) => (
<span className="text-muted-foreground">{row.date}</span>
) },
];
export type DashboardShowcaseProps = Omit<HTMLMotionProps<"div">, "children">;
export const DashboardShowcase = React.forwardRef<
HTMLDivElement,
DashboardShowcaseProps
>(({ className, ...props }, ref) => (
<motion.div
ref={ref}
variants={fadeUp}
initial="hidden"
whileInView="visible"
viewport={viewportOnce}
className={cn(
"overflow-hidden rounded-2xl border border-border bg-background shadow-lift",
className
)}
{...props}
>
<div className="flex">
<Sidebar
className="hidden shrink-0 lg:flex"
defaultActiveValue="home"
brand={
<div className="flex items-center gap-2">
<span className="flex size-8 items-center justify-center rounded-lg bg-primary text-primary-foreground">
<TrendingUp className="size-4" />
</span>
<span className="font-display text-base font-semibold tracking-tight">
SealView
</span>
</div>
}
sections={[
{
title: "Main menu",
items: [
{ label: "Home", icon: Home, value: "home" },
{ label: "Customers", icon: Users, value: "customers" },
{ label: "Wallet", icon: Wallet, value: "wallet" },
{ label: "Products", icon: LayoutGrid, value: "products" },
],
},
{
title: "Other",
items: [
{ label: "Billing", icon: CreditCard, value: "billing" },
{ label: "Settings", icon: Settings, value: "settings" },
],
},
]}
/>
<div className="min-w-0 flex-1">
{/* Top bar */}
<div className="flex items-center justify-between gap-4 border-b border-border px-5 py-3.5">
<div>
<p className="font-display text-lg font-semibold tracking-tight">
My Dashboard
</p>
<p className="text-xs text-muted-foreground">
Welcome back, Esther
</p>
</div>
<div className="flex items-center gap-3">
<div className="hidden items-center gap-2 rounded-lg border border-border bg-muted/50 px-3 py-1.5 text-sm text-muted-foreground sm:flex">
<Search className="size-4" />
<span>Search…</span>
</div>
<span className="relative flex size-9 items-center justify-center rounded-lg border border-border text-muted-foreground">
<Bell className="size-4" />
<span className="absolute right-2 top-2 size-1.5 rounded-full bg-brand" />
</span>
<Avatar className="size-9">
<AvatarImage
src="https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=96&h=96&fit=crop&crop=faces&q=80&auto=format"
alt="Esther H."
/>
<AvatarFallback>EH</AvatarFallback>
</Avatar>
</div>
</div>
{/* Content */}
<div className="space-y-5 p-5">
<div className="flex items-center justify-between gap-3">
<h3 className="text-sm font-medium text-muted-foreground">
Overview
</h3>
<SegmentedControl
size="sm"
defaultValue="month"
options={[
{ label: "Week", value: "week" },
{ label: "Month", value: "month" },
{ label: "Year", value: "year" },
]}
/>
</div>
<StatGrid columns={3}>
<StatCard
icon={Wallet}
iconClassName="bg-brand/12 text-brand"
label="Balance"
prefix="$"
value={24006}
trend={27.4}
trendLabel="vs last month"
/>
<StatCard
icon={TrendingUp}
iconClassName="bg-chart-2/12 text-chart-2"
label="Spending"
prefix="$"
value={8240}
trend={10.0}
trendLabel="vs last month"
/>
<StatCard
icon={CreditCard}
iconClassName="bg-chart-4/15 text-chart-4"
label="Investing"
prefix="$"
value={12480}
trend={-4.2}
trendLabel="vs last month"
/>
</StatGrid>
<div className="grid grid-cols-1 gap-5 lg:grid-cols-3">
<div className="rounded-xl border border-border bg-card p-5 shadow-soft lg:col-span-2">
<div className="mb-4 flex items-center justify-between">
<div>
<p className="text-sm font-medium text-foreground">
Income vs Expense
</p>
<p className="text-xs text-muted-foreground">Last 6 months</p>
</div>
<div className="flex items-center gap-3 text-xs text-muted-foreground">
<span className="flex items-center gap-1.5">
<span className="size-2 rounded-full bg-chart-1" /> Income
</span>
<span className="flex items-center gap-1.5">
<span className="size-2 rounded-full bg-chart-2" /> Expense
</span>
</div>
</div>
<AreaChart
height={220}
index="month"
categories={["Income", "Expense"]}
colors={["--chart-1", "--chart-2"]}
valueFormat={(n) => `$${n.toLocaleString()}k`}
data={[
{ month: "Jan", Income: 12, Expense: 8 },
{ month: "Feb", Income: 19, Expense: 11 },
{ month: "Mar", Income: 15, Expense: 9 },
{ month: "Apr", Income: 27, Expense: 14 },
{ month: "May", Income: 22, Expense: 12 },
{ month: "Jun", Income: 34, Expense: 19 },
]}
/>
</div>
<div className="rounded-xl border border-border bg-card p-5 shadow-soft">
<p className="mb-4 text-sm font-medium text-foreground">
Spend by category
</p>
<DonutChart
size={150}
thickness={18}
centerValue="$3K"
centerLabel="Total"
data={[
{ name: "Essentials", value: 45 },
{ name: "Investments", value: 25 },
{ name: "Subscriptions", value: 30 },
]}
/>
</div>
</div>
<div>
<p className="mb-3 text-sm font-medium text-foreground">
Recent deals
</p>
<DataTable columns={columns} data={deals} />
</div>
</div>
</div>
</div>
</motion.div>
));
DashboardShowcase.displayName = "DashboardShowcase";src/components/application/dashboard-showcase.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | Optional shell class overrides. |