Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go
780 B
Raw Blame
import type { ComponentProps } from "react";
import { cn } from "@multica/ui/lib/utils";

interface ShimmerTextProps extends Omit<ComponentProps<"span">, "children"> {
  children: string;
  active?: boolean;
}

/**
 * A single-line activity label. Only the decorative highlight moves. Space it
 * with margin, never padding: the highlight copy is laid from the padding edge.
 */
export function ShimmerText({
  children,
  active = true,
  className,
  ...props
}: ShimmerTextProps) {
  return (
    <span className={cn(active && "shimmer-text", className)} {...props}>
      {children}
      {active && (
        <span className="shimmer-text-window" aria-hidden="true">
          <span className="shimmer-text-copy">{children}</span>
        </span>
      )}
    </span>
  );
}