mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-11 09:51:40 +00:00
126 lines
4.7 KiB
TypeScript
126 lines
4.7 KiB
TypeScript
import { Metadata } from "next"
|
|
import { IconTrendingDown, IconTrendingUp } from "@tabler/icons-react"
|
|
|
|
import { Badge } from "@/registry/new-york-v4/ui/badge"
|
|
import {
|
|
Card,
|
|
CardAction,
|
|
CardDescription,
|
|
CardFooter,
|
|
CardHeader,
|
|
CardTitle,
|
|
} from "@/registry/new-york-v4/ui/card"
|
|
import { ChartAreaInteractive } from "@/app/(examples)/dashboard-02/components/chart-area-interactive"
|
|
import { DataTable } from "@/app/(examples)/dashboard-02/components/data-table"
|
|
|
|
import data from "./data.json"
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Dashboard",
|
|
description: "A dashboard with tabs, table and sidebar.",
|
|
}
|
|
|
|
export default async function Dashboard02() {
|
|
return (
|
|
<div className="@container/main flex flex-1 flex-col gap-2">
|
|
<div className="flex flex-col gap-4 py-4 md:gap-6 md:py-6">
|
|
<div className="*:data-[slot=card]:from-primary/5 *:data-[slot=card]:to-card dark:*:data-[slot=card]:bg-card grid grid-cols-1 gap-4 px-4 *:data-[slot=card]:bg-gradient-to-t *:data-[slot=card]:shadow-xs lg:px-6 @xl/main:grid-cols-2 @5xl/main:grid-cols-4">
|
|
<Card className="@container/card">
|
|
<CardHeader>
|
|
<CardDescription>Total Revenue</CardDescription>
|
|
<CardTitle className="text-2xl font-semibold tabular-nums @[250px]/card:text-3xl">
|
|
$1,250.00
|
|
</CardTitle>
|
|
<CardAction>
|
|
<Badge variant="outline">
|
|
<IconTrendingUp />
|
|
+12.5%
|
|
</Badge>
|
|
</CardAction>
|
|
</CardHeader>
|
|
<CardFooter className="flex-col items-start gap-2.5 text-sm">
|
|
<div className="line-clamp-1 flex gap-2 font-medium">
|
|
Trending up this month <IconTrendingUp className="size-4" />
|
|
</div>
|
|
<div className="text-muted-foreground">
|
|
Visitors for the last 6 months
|
|
</div>
|
|
</CardFooter>
|
|
</Card>
|
|
<Card className="@container/card">
|
|
<CardHeader>
|
|
<CardDescription>New Customers</CardDescription>
|
|
<CardTitle className="text-2xl font-semibold tabular-nums @[250px]/card:text-3xl">
|
|
1,234
|
|
</CardTitle>
|
|
<CardAction>
|
|
<Badge variant="outline">
|
|
<IconTrendingDown />
|
|
-20%
|
|
</Badge>
|
|
</CardAction>
|
|
</CardHeader>
|
|
<CardFooter className="flex-col items-start gap-1.5 text-sm">
|
|
<div className="line-clamp-1 flex gap-2 font-medium">
|
|
Down 20% this period <IconTrendingDown className="size-4" />
|
|
</div>
|
|
<div className="text-muted-foreground">
|
|
Acquisition needs attention
|
|
</div>
|
|
</CardFooter>
|
|
</Card>
|
|
<Card className="@container/card">
|
|
<CardHeader>
|
|
<CardDescription>Active Accounts</CardDescription>
|
|
<CardTitle className="text-2xl font-semibold tabular-nums @[250px]/card:text-3xl">
|
|
45,678
|
|
</CardTitle>
|
|
<CardAction>
|
|
<Badge variant="outline">
|
|
<IconTrendingUp />
|
|
+12.5%
|
|
</Badge>
|
|
</CardAction>
|
|
</CardHeader>
|
|
<CardFooter className="flex-col items-start gap-1.5 text-sm">
|
|
<div className="line-clamp-1 flex gap-2 font-medium">
|
|
Strong user retention <IconTrendingUp className="size-4" />
|
|
</div>
|
|
<div className="text-muted-foreground">
|
|
Engagement exceed targets
|
|
</div>
|
|
</CardFooter>
|
|
</Card>
|
|
<Card className="@container/card">
|
|
<CardHeader>
|
|
<CardDescription>Growth Rate</CardDescription>
|
|
<CardTitle className="text-2xl font-semibold tabular-nums @[250px]/card:text-3xl">
|
|
4.5%
|
|
</CardTitle>
|
|
<CardAction>
|
|
<Badge variant="outline">
|
|
<IconTrendingUp />
|
|
+4.5%
|
|
</Badge>
|
|
</CardAction>
|
|
</CardHeader>
|
|
<CardFooter className="flex-col items-start gap-1.5 text-sm">
|
|
<div className="line-clamp-1 flex gap-2 font-medium">
|
|
Steady performance increase{" "}
|
|
<IconTrendingUp className="size-4" />
|
|
</div>
|
|
<div className="text-muted-foreground">
|
|
Meets growth projections
|
|
</div>
|
|
</CardFooter>
|
|
</Card>
|
|
</div>
|
|
<div className="px-4 lg:px-6">
|
|
<ChartAreaInteractive />
|
|
</div>
|
|
<DataTable data={data} />
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|