vijayksingh

Hover Engraving

Cards

About

A frosted tooltip-like pill that reveals a block's metadata (kind, timestamps, derived tags, and a status LED) after the pointer dwells on it for 420ms, useful for annotating list items or notes without cluttering the UI.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Hover Engraving to your project and fits it to your theme.

Code

How Hover Engraving is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import * as React from "react";
import HoverEngraving, {
  type EngravingStatus,
} from "@/components/ui/hover-engraving";

const LIST: {
  text: string;
  kind: string;
  details: string[];
  tags?: string[];
  status?: { led: EngravingStatus; text: string };
}[] = [
  {
    text: "slept badly, up at 5",
    kind: "LOG",
    details: ["07:40", "SLEEP 6 H", "ALSO TIRED"],
    status: { led: "live", text: "RECOGNIZER ✓" },
  },
  {
    text: "send the poster tomorrow 4pm",
    kind: "TASK",
    details: ["TOMORROW 16:00"],
    tags: ["poster"],
    status: { led: "live", text: "RECOGNIZER ✓" },
  },
  {
    text: "lunch with Priya",
    kind: "LUNCH? 0.71",
    details: [],
    status: { led: "waiting", text: "ASKING…" },
  },
  {
    text: "sk-live-4f9a…",
    kind: "NOT SENT",
    details: ["LOOKS LIKE A SECRET"],
    status: { led: "off", text: "KEPT ON THIS MAC" },
  },
];

export default function HoverEngravingDemo() {
  return (
    <div className="w-full h-screen flex items-center justify-center bg-[var(--background)] text-[var(--foreground)]">
      <div className="flex flex-col gap-8" data-testid="eng-list">
        {LIST.map((b, i) => (
          <div
            key={b.text}
            className="mu-icon-trigger relative w-fit rounded-plate py-4 pr-8"
            aria-describedby={`eng-${i}`}
            data-block={i}
          >
            <span className="type-content text-ink">{b.text}</span>
            <HoverEngraving
              id={`eng-${i}`}
              kind={b.kind}
              details={b.details}
              tags={b.tags}
              status={b.status}
              placement="beside"
            />
          </div>
        ))}
      </div>
    </div>
  );
}

More by vijayksingh

View all
  • Weather Widget

    Weather Widget

    90
  • Meter

    Meter

    10
  • Skeleton Loader

    Skeleton Loader

    9
  • Textarea

    Textarea

    2
  • Well

    Well

    1
  • Soft Hardware Spinner

    Soft Hardware Spinner

    1
  • Settings List

    Settings List

  • Perfect Preview

    Perfect Preview

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.1K
  • Card

    Card

    70
  • Statistics Card 2

    Statistics Card 2

    273
  • Statistics Card 7

    Statistics Card 7

    301
  • Interactive Tech Stack Bento Grid with Hover Effects

    Interactive Tech Stack Bento Grid with Hover Effects

    184
  • Stats cards with links

    Stats cards with links

    82
  • Weather Card

    Weather Card

    57
  • Card Studio

    Card Studio

    9