Server Crash
An animated server-with-crash icon from the lucide-animated registry, built with motion/react and forwardRef. On hover it draws a lightning-style crash line across the server stack, and a ref handle exposes startAnimation and stopAnimation for programmatic control.


shadcn add · no workarounds · theme neutral (none shipped)Installation
Usage
import { ServerCrashIcon } from "@/components/ui/server-crash";export function Example() { return <ServerCrashIcon className="text-red-500" />;}- Status or error indicators for server downtime, outages, failed deployments, or crashed services in dashboards and admin panels
- Hover-triggered micro-interactions on navigation items, feature cards, or status badges related to infrastructure or backend health
- Controlled animations where a parent component triggers the crash effect through a ref, for example when a health check fails
- Empty-state or error-state illustrations on pages such as 500 errors, maintenance notices, or service disruption messages
Examples
Hover to animate (uncontrolled)
By default the crash line animates on mouse enter and resets on mouse leave. No ref is needed.
import { ServerCrashIcon } from "@/components/ui/server-crash";export function ServerStatusRow() { return ( <div className="flex items-center gap-3 rounded-md border p-3"> <ServerCrashIcon className="text-red-500" /> <span className="text-sm">db-primary: connection lost</span> </div> );}Imperative control via ref
Passing a ref switches the component to controlled mode. Hover no longer plays the animation automatically, so the parent calls startAnimation and stopAnimation.
import { useEffect, useRef } from "react";import { ServerCrashIcon, type ServerCrashIconHandle } from "@/components/ui/server-crash";export function HealthBadge({ healthy }: { healthy: boolean }) { const iconRef = useRef<ServerCrashIconHandle>(null); useEffect(() => { if (healthy) { iconRef.current?.stopAnimation(); } else { iconRef.current?.startAnimation(); } }, [healthy]); return <ServerCrashIcon ref={iconRef} className="text-amber-500" />;}Inside a button with a label
The icon can sit inside a button. Hover reveals the crash animation, and the surrounding button keeps its own click behavior.
import { ServerCrashIcon } from "@/components/ui/server-crash";export function RestartServiceButton() { return ( <button type="button" className="inline-flex items-center gap-2 rounded-md border px-3 py-2 text-sm hover:bg-muted" > <ServerCrashIcon className="size-5" /> Restart service </button> );}API reference
Accessibility
- The icon is decorative by default. The inner SVG has no role, title, or aria-label. When it conveys meaning (for example, a server outage), add aria-label or a visible text label on the wrapper or the parent, or pass role="img" and aria-label through props.
- If the icon is purely decorative next to a text label, set aria-hidden="true" on the component so screen readers skip it. The prop is forwarded to the wrapper div.
- Hover-only animation gives no feedback to keyboard or touch users. Do not rely on it to communicate state. Pair the icon with text that describes the status.
- The 0.4s animation is short and non-looping, so it does not need a reduced-motion override. If you trigger it via startAnimation in response to frequent state changes, avoid replaying it in a way that causes visual noise.
- When used inside an interactive element such as a button or link, the accessible name comes from the surrounding text, so keep that text descriptive.
Docs written by anthropic:claude-haiku-5-5 from the registry source.
Use with Coding Agent
Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.
Use the "Server Crash" component (lucide-animated/server-crash) from its shadcn registry.1. Install it with: npx shadcn@latest add https://lucide-animated.com/r/server-crash.json2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: size, className, onMouseEnter, onMouseLeave, ref, ...props (HTMLAttributes<HTMLDivElement>).Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { ServerCrashIcon } from "@/components/ui/server-crash";export function Example() { return <ServerCrashIcon className="text-red-500" />;}```Files & dependencies
- server-crash.tsx