Components / AI Dashboards
AI Service Status Badge
An AI service status indicator showing operational health with animated pulse dots and uptime percentages.
Components / AI Dashboards
An AI service status indicator showing operational health with animated pulse dots and uptime percentages.
Inference API
operational
99.98%
Uptime
Install the core libraries required for this component.
npm install react lucide-react"use client";
import React from "react";
import { CheckCircle2, HelpCircle } from "lucide-react";
interface ServiceStatusProps {
name?: string;
status?: "operational" | "degraded" | "outage";
uptime?: string;
}
export default function AIServiceStatus({
name = "Inference API",
status = "operational",
uptime = "99.98%"
}: ServiceStatusProps) {
return (
<div className="rounded-xl border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 px-4 py-3 shadow-sm w-full max-w-xs mx-auto flex items-center justify-between">
<div className="flex items-center gap-3">
<div className="relative">
<div className={`h-2.5 w-2.5 rounded-full ${status === "operational" ? "bg-emerald-500" : status === "degraded" ? "bg-amber-500" : "bg-red-500"
}`} />
<div className={`absolute inset-0 h-2.5 w-2.5 rounded-full animate-ping opacity-75 ${status === "operational" ? "bg-emerald-500" : status === "degraded" ? "bg-amber-500" : "bg-red-500"
}`} />
</div>
<div>
<p className="text-sm font-bold text-zinc-900 dark:text-zinc-100 leading-tight">{name}</p>
<p className="text-[10px] text-zinc-500 font-medium uppercase tracking-wider">{status}</p>
</div>
</div>
<div className="text-right">
<p className="text-xs font-bold text-zinc-900 dark:text-zinc-100">{uptime}</p>
<p className="text-[10px] text-zinc-500 font-medium">Uptime</p>
</div>
</div>
);
} "use client";
import React from "react";
import { CheckCircle2, HelpCircle } from "lucide-react";
interface ServiceStatusProps {
name?: string;
status?: "operational" | "degraded" | "outage";
uptime?: string;
}
export default function AIServiceStatus({
name = "Inference API",
status = "operational",
uptime = "99.98%"
}: ServiceStatusProps) {
return (
<div className="rounded-xl border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 px-4 py-3 shadow-sm w-full max-w-xs mx-auto flex items-center justify-between">
<div className="flex items-center gap-3">
<div className="relative">
<div className={`h-2.5 w-2.5 rounded-full ${status === "operational" ? "bg-emerald-500" : status === "degraded" ? "bg-amber-500" : "bg-red-500"
}`} />
<div className={`absolute inset-0 h-2.5 w-2.5 rounded-full animate-ping opacity-75 ${status === "operational" ? "bg-emerald-500" : status === "degraded" ? "bg-amber-500" : "bg-red-500"
}`} />
</div>
<div>
<p className="text-sm font-bold text-zinc-900 dark:text-zinc-100 leading-tight">{name}</p>
<p className="text-[10px] text-zinc-500 font-medium uppercase tracking-wider">{status}</p>
</div>
</div>
<div className="text-right">
<p className="text-xs font-bold text-zinc-900 dark:text-zinc-100">{uptime}</p>
<p className="text-[10px] text-zinc-500 font-medium">Uptime</p>
</div>
</div>
);
} Types and interfaces defined in this component.
interface ServiceStatusProps {
name?: string;
status?: "operational" | "degraded" | "outage";
uptime?: string;
} interface ServiceStatusProps {
name?: string;
status?: "operational" | "degraded" | "outage";
uptime?: string;
} Internal functions used to handle component logic.
| Function | Parameters |
|---|---|
| AIServiceStatus() | { name = "Inference API", status = "operational", uptime = "99.98%" }: ServiceStatusProps |
Every JSX/HTML tag used in this component, with usage count and source.
| Tag | Count | Type | Source |
|---|---|---|---|
| <div> | 7× | | Native HTML |
| <p> | 4× | | Native HTML |