dashboard-3
efferd-/dashboard-3FreeBlock
Customer support dashboard with conversation charts, CSAT scores, on-duty team, and recent tickets.
Install it
npx shadcn@latest add http://efferd.com/r/dashboard-3.jsonSource
1"use client";23import { cn } from "@/lib/utils";4import type { ComponentProps } from "react";5import { LabelList, Pie, PieChart } from "recharts";6import {7 Card,8 CardContent,9 CardDescription,10 CardHeader,11 CardTitle,12} from "@/components/ui/card";13import {14 type ChartConfig,15 ChartContainer,16 ChartLegend,17 ChartLegendContent,18} from "@/components/ui/chart";19import { Delta, DeltaIcon, DeltaValue } from "@/components/delta";2021type ChannelKey = "direct" | "email" | "social";2223type ChannelDatum = {24 channel: ChannelKey;25 share: number;26 fill: string;27};2829const chartData: ChannelDatum[] = [30 { channel: "direct", share: 44, fill: "var(--color-direct)" },31 { channel: "email", share: 36, fill: "var(--color-email)" },32 { channel: "social", share: 20, fill: "var(--color-social)" },33];3435const chartConfig = {36 share: {37 label: "Share",38 },39 direct: {40 label: "Direct",41 color: "var(--chart-1)",42 },43 email: {44 label: "Email",45 color: "var(--chart-3)",46 },47 social: {48 label: "Social",49 color: "var(--chart-5)",50 },51} satisfies ChartConfig;5253export function ChannelBreakdownChart({54 className,55 ...props56}: ComponentProps<typeof Card>) {57 return (58 <Card59 className={cn("flex flex-col shadow-none dark:ring-0", className)}60 {...props}61 >62 <CardHeader className="items-center space-y-1 pb-0 sm:items-start">63 <div className="flex flex-wrap items-center justify-center gap-2 sm:justify-start">64 <CardTitle>Traffic by channel</CardTitle>65 <Delta value={2.4} variant="badge">66 <DeltaIcon variant="trend" />67 <DeltaValue suffix="pp" />68 </Delta>69 </div>70 <CardDescription>71 Share of new conversations in last 7 days72 </CardDescription>73 </CardHeader>74 <CardContent className="my-auto">75 <ChartContainer76 className="mx-auto aspect-square max-h-72 w-full"77 config={chartConfig}78 >79 <PieChart accessibilityLayer>80 <Pie81 cornerRadius={8}82 data={chartData}83 dataKey="share"84 innerRadius={36}85 nameKey="channel"86 outerRadius="88%"87 stroke="var(--card)"88 strokeWidth={4}89 >90 <LabelList91 className="fill-background font-medium"92 dataKey="share"93 fill="currentColor"94 fontWeight={500}95 formatter={(label) => {96 const n = Number(label);97 return Number.isFinite(n) ? `${n}%` : String(label ?? "");98 }}99 position="inside"100 stroke="none"101 />102 </Pie>103// … truncated
What it pulls in
Other registry items
Files it writes
More from efferd
All 201 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| app-shell-1app-shell-1 | efferd | Blocks | Paid | no deps · 7 files | |
| app-shell-10app-shell-10 | efferd | Blocks | Paid | 1 dep · 13 files | |
| app-shell-2app-shell-2 | efferd | Blocks | Paid | no deps · 9 files | |
| app-shell-3app-shell-3 | efferd | Blocks | Paid | no deps · 9 files | |
| app-shell-4app-shell-4 | efferd | Blocks | Paid | no deps · 9 files | |
| app-shell-5app-shell-5 | efferd | Blocks | Free | 1 dep · 9 files | |
| app-shell-6app-shell-6 | efferd | Blocks | Paid | no deps · 11 files | |
| app-shell-7app-shell-7 | efferd | Blocks | Paid | no deps · 12 files |
