Skip to content

secondsky/claude-skills / plugins/auto-animate/skills/auto-animate

auto-animate

Verified

AutoAnimate (@formkit/auto-animate) zero-config animations for React. Use for list transitions, accordions, toasts, or encountering SSR errors, animation libraries complexity.

templates/toast-notifications.tsx

View on GitHub
// AutoAnimate - Toast Notifications
// Fade in/out for temporary messages

import { useAutoAnimate } from "@formkit/auto-animate/react";
import { useState, useEffect } from "react";

interface Toast {
  id: number;
  message: string;
  type: "success" | "error" | "info";
}

export function ToastExample() {
  const [parent] = useAutoAnimate();
  const [toasts, setToasts] = useState<Toast[]>([]);

  const addToast = (message: string, type: Toast["type"]) => {
    const id = Date.now();
    setToasts((prev) => [...prev, { id, message, type }]);

    // Auto-remove after 3 seconds
    setTimeout(() => {
      setToasts((prev) => prev.filter((t) => t.id !== id));
    }, 3000);
  };

  return (
    <div className="p-6">
      <div className="flex gap-2 mb-4">
        <button
          onClick={() => addToast("Success!", "success")}
          className="px-4 py-2 bg-green-600 text-white rounded"
        >
          Success Toast
        </button>
        <button
          onClick={() => addToast("Error occurred", "error")}
          className="px-4 py-2 bg-red-600 text-white rounded"
        >
          Error Toast
        </button>
        <button
          onClick={() => addToast("Info message", "info")}
          className="px-4 py-2 bg-blue-600 text-white rounded"
        >
          Info Toast
        </button>
      </div>

      {/* Toast container */}
      <div
        ref={parent}
        className="fixed top-4 right-4 space-y-2 w-80"
      >
        {toasts.map((toast) => (
          <div
            key={toast.id}
            className={`p-4 rounded shadow-lg ${
              toast.type === "success"
                ? "bg-green-500"
                : toast.type === "error"
                ? "bg-red-500"
                : "bg-blue-500"
            } text-white`}
          >
            {toast.message}
          </div>
        ))}
      </div>
    </div>
  );
}
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall