Folder Dot
An animated folder icon from the lucide-animated registry where a dot inside the folder fades out and back in when hovered or when the animation is triggered programmatically via ref. It is a drop-in replacement for a static folder glyph built on motion/react.


shadcn add · no workarounds · theme neutral (none shipped)Installation
Usage
import { FolderDotIcon } from "@/components/ui/folder-dot";export function Example() { return <FolderDotIcon />;}- Show a folder or file-collection affordance in navigation, sidebars, or file lists that should subtly react to hover.
- Add a blinking-dot status cue on a folder (for example unread or syncing) triggered by a parent component through a ref.
- Use as an icon inside buttons, menu items, or cards where a lightweight motion accent is desired without a GIF or Lottie file.
- Replace a static folder icon when the design calls for micro-interactions built on motion/react.
Examples
Hover-triggered default animation
With no ref, the dot animates automatically on mouse enter and resets on mouse leave.
import { FolderDotIcon } from "@/components/ui/folder-dot";export function FolderLink() { return ( <a href="/documents" className="inline-flex items-center gap-2 text-sm"> <FolderDotIcon size={20} className="text-amber-500" /> Documents </a> );}Programmatic control via ref
Using the imperative handle to start and stop the dot animation from a parent, for example while a sync job runs.
"use client";import { useEffect, useRef } from "react";import { FolderDotIcon, type FolderDotIconHandle } from "@/components/ui/folder-dot";export function SyncingFolder({ syncing }: { syncing: boolean }) { const ref = useRef<FolderDotIconHandle>(null); useEffect(() => { if (syncing) { ref.current?.startAnimation(); } else { ref.current?.stopAnimation(); } }, [syncing]); return <FolderDotIcon ref={ref} size={24} />;}Custom hover handlers in controlled mode
Once a ref is attached, the built-in hover animation is disabled and the component forwards mouse events to the provided handlers instead.
"use client";import { useRef } from "react";import { FolderDotIcon, type FolderDotIconHandle } from "@/components/ui/folder-dot";export function ControlledFolder() { const ref = useRef<FolderDotIconHandle>(null); return ( <div onMouseEnter={() => ref.current?.startAnimation()} onMouseLeave={() => ref.current?.stopAnimation()} > <FolderDotIcon ref={ref} size={32} /> </div> );}API reference
Accessibility
- The component renders a decorative SVG with no title or role; if the icon conveys meaning, pass aria-label and role="img" on the wrapper via props, or place adjacent visible text.
- If the icon is purely decorative next to a text label, add aria-hidden="true" to avoid redundant announcements.
- The animation is a brief opacity blink (0.6s); consider honoring prefers-reduced-motion by not calling startAnimation in that case, since the component itself does not check the media query.
- Hover-only triggers are not keyboard accessible; when the icon is interactive, also trigger startAnimation on focus or wrap it in a focusable element.
- Stroke color follows currentColor, so ensure sufficient contrast against the background in both light and dark themes.
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.
Use the "Folder Dot" component (lucide-animated/folder-dot) from its shadcn registry.1. Install it with: npx shadcn@latest add https://lucide-animated.com/r/folder-dot.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, onMouseEnter, onMouseLeave, ref, ...HTMLAttributes<HTMLDivElement>.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { FolderDotIcon } from "@/components/ui/folder-dot";export function Example() { return <FolderDotIcon />;}```Files & dependencies
- folder-dot.tsx