Laptop Minimal Check
An animated laptop icon with a check mark inside the screen. The check draws itself in on hover and resets on mouse leave, and it can also be driven programmatically through a ref.


Installed with plain
See how it was built shadcn add · no workarounds · theme neutral (none shipped)Installation
pnpm dlx shadcn@latest add https://lucide-animated.com/r/laptop-minimal-check.json
Usage
usage.tsx
import { LaptopMinimalCheckIcon } from "@/components/ui/laptop-minimal-check";export function Example() { return <LaptopMinimalCheckIcon className="text-foreground" size={28} />;}- Showing a successful action, saved state, or completed device or session check on a laptop or computer-related UI
- Adding a subtle hover micro-interaction to a feature card, settings row, or status badge
- Triggering a check-draw animation from code (for example after a form submit) through the exposed ref handle
- Using a lightweight, theme-aware line icon that follows the surrounding text color
Examples
Basic hover icon
Renders the icon with a custom color and size. The check animates automatically on hover.
basic-hover-icon.tsx
import { LaptopMinimalCheckIcon } from "@/components/ui/laptop-minimal-check";export default function Demo() { return ( <LaptopMinimalCheckIcon className="text-emerald-500" size={32} /> );}Programmatic control via ref
Attaching the ref switches the icon to controlled mode, so hover no longer animates it automatically. Call startAnimation and stopAnimation from your own handlers.
programmatic-control-via-ref.tsx
import { useRef } from "react";import { LaptopMinimalCheckIcon, type LaptopMinimalCheckIconHandle } from "@/components/ui/laptop-minimal-check";export function SaveStatus() { const iconRef = useRef<LaptopMinimalCheckIconHandle>(null); return ( <button type="button" className="inline-flex items-center gap-2 rounded-md border px-3 py-2 text-sm" onClick={() => iconRef.current?.startAnimation()} onBlur={() => iconRef.current?.stopAnimation()} > <LaptopMinimalCheckIcon ref={iconRef} size={20} /> Saved to laptop </button> );}Feature card with hover group
Uses the icon as a decorative element inside a settings row. The color comes from the surrounding Tailwind classes.
feature-card-with-hover-group.tsx
import { LaptopMinimalCheckIcon } from "@/components/ui/laptop-minimal-check";export function DeviceRow() { return ( <div className="flex items-center gap-3 rounded-lg border p-4 text-slate-700 hover:bg-slate-50"> <LaptopMinimalCheckIcon className="shrink-0 text-blue-600" size={24} /> <div> <p className="font-medium">Device verified</p> <p className="text-sm text-slate-500">This laptop is trusted.</p> </div> </div> );}API reference
PropTypeDefaultDescription
sizenumber28Width and height of the SVG in pixels. The viewBox stays 0 0 24 24.
classNamestring—Applied to the outer div wrapper, not the SVG. Use it for color (text-*) and spacing utilities.
refReact.Ref<LaptopMinimalCheckIconHandle>—Exposes startAnimation() and stopAnimation(). Attaching the ref puts the icon in controlled mode, which disables the built-in hover animation and makes onMouseEnter and onMouseLeave be forwarded to the caller instead of animating.
onMouseEnter(e: React.MouseEvent<HTMLDivElement>) => void—Called on mouse enter only when the ref is attached (controlled mode). Without a ref, the component animates on hover and this prop is not called.
onMouseLeave(e: React.MouseEvent<HTMLDivElement>) => void—Called on mouse leave only when the ref is attached (controlled mode). Without a ref, the component resets the animation on leave and this prop is not called.
...HTMLAttributes<HTMLDivElement>HTMLAttributes<HTMLDivElement>—Any other div attributes (id, style, aria-*, data-*, etc.) are spread onto the outer div wrapper.
Accessibility
- The SVG has no title, desc, or role, so it is decorative by default. If the icon conveys meaning on its own, wrap it or add role="img" and aria-label on the wrapper (pass them via props, since they spread onto the div).
- When the status is important, do not rely on the icon alone. Pair it with visible text such as "Saved" so screen reader and color-blind users get the same information.
- The animation is short (about 0.4s) and non-looping. It does not need a reduced-motion fallback, but avoid triggering it repeatedly in a way that distracts users.
- Because the wrapper is a div with mouse handlers, it is not focusable or keyboard-operable. If hover behavior matters, also provide the same state through a focusable control, for example by calling startAnimation from an onFocus or onClick handler.
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.
prompt.md
Use the "Laptop Minimal Check" component (lucide-animated/laptop-minimal-check) from its shadcn registry.1. Install it with: npx shadcn@latest add https://lucide-animated.com/r/laptop-minimal-check.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, ref, onMouseEnter, onMouseLeave, ...HTMLAttributes<HTMLDivElement>.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { LaptopMinimalCheckIcon } from "@/components/ui/laptop-minimal-check";export function Example() { return <LaptopMinimalCheckIcon className="text-foreground" size={28} />;}```Files & dependencies
- laptop-minimal-check.tsx
dependenciesmotion