secondsky/claude-skills / plugins/auto-animate/skills/auto-animate
auto-animate
VerifiedAutoAnimate (@formkit/auto-animate) zero-config animations for React. Use for list transitions, accordions, toasts, or encountering SSR errors, animation libraries complexity.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.4 KB |
| assets/example-template.txt | markdown | 416 B |
| references/auto-animate-vs-motion.md | markdown | 9.8 KB |
| references/css-conflicts.md | markdown | 13.0 KB |
| references/example-reference.md | markdown | 760 B |
| references/ssr-patterns.md | markdown | 12.4 KB |
| scripts/example-script.shexecutable | script | 302 B |
| scripts/init-auto-animate.shexecutable | script | 8.8 KB |
| templates/accordion.tsx | other | 2.7 KB |
| templates/filter-sort-list.tsx | other | 3.2 KB |
| templates/form-validation.tsx | other | 4.2 KB |
| templates/react-basic.tsx | other | 2.8 KB |
| templates/react-typescript.tsx | other | 4.7 KB |
| templates/toast-notifications.tsx | other | 1.9 KB |
| templates/vite-ssr-safe.tsx | other | 4.2 KB |
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>
);
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| 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: 194k | Updated | Claude CodeCodex | Verified | Install |