Tornado
TornadoIcon is an animated tornado-style icon built from five horizontal stroked lines that shake side to side in a staggered wave on hover. It is a forwardRef component powered by motion/react, and it can be controlled imperatively through startAnimation and stopAnimation.


shadcn add · no workarounds · theme neutral (none shipped)Installation
Usage
import { TornadoIcon } from '@/components/ui/tornado'; export default function Example() { return <TornadoIcon className='text-foreground' />; }- Use as an animated weather or wind indicator, for example in a forecast widget, storm alert, or weather app header.
- Use as a hover-triggered decorative icon on feature cards, navigation items, or buttons where a subtle motion cue adds delight.
- Use as a controlled loading or processing indicator by calling startAnimation and stopAnimation through a ref.
- Avoid when the icon must convey static meaning only or when users may have reduced-motion preferences and the animation is not essential.
Examples
Hover-animated icon
Basic usage. The animation plays on mouse enter and resets on mouse leave, with no ref needed.
import { TornadoIcon } from '@/components/ui/tornado'; export default function HoverExample() { return ( <div className='flex items-center gap-2 text-sm'> <TornadoIcon size={32} className='text-blue-500' /> <span>Storm warning</span> </div> ); }Controlled animation via ref
Attach a ref to drive the animation imperatively, for example while a background task is running. When a ref is attached, hover handlers forward to your own callbacks instead of animating automatically.
import { useEffect, useRef } from 'react'; import { Button } from '@/components/ui/button'; import { TornadoIcon, type TornadoIconHandle } from '@/components/ui/tornado'; export default function ControlledExample({ loading }: { loading: boolean }) { const iconRef = useRef<TornadoIconHandle>(null); useEffect(() => { if (loading) { iconRef.current?.startAnimation(); } else { iconRef.current?.stopAnimation(); } }, [loading]); return ( <Button variant='outline'> <TornadoIcon ref={iconRef} size={18} className='mr-2' /> Syncing forecast </Button> ); }Custom hover handlers with ref
When a ref is attached, onMouseEnter and onMouseLeave are called as regular callbacks and the built-in animation is not triggered automatically. This example combines a ref with custom tracking.
import { useRef } from 'react'; import { TornadoIcon, type TornadoIconHandle } from '@/components/ui/tornado'; export default function HandlerExample() { const iconRef = useRef<TornadoIconHandle>(null); return ( <div onMouseEnter={() => iconRef.current?.startAnimation()} onMouseLeave={() => iconRef.current?.stopAnimation()} className='inline-flex cursor-pointer rounded-md border p-3'> <TornadoIcon ref={iconRef} size={24} /> </div> ); }API reference
Accessibility
- The SVG has no title, desc, or role attribute. If the icon conveys meaning, add aria-label or a visible text label on the wrapper, for example aria-label='Tornado warning' with role='img'.
- If the icon is purely decorative next to visible text, add aria-hidden='true' on the component to hide it from assistive technology.
- The wrapper div is not focusable by default. If the icon triggers an action or is interactive, add tabIndex={0}, a role such as button, and keyboard handlers.
- The animation is a motion effect. Respect prefers-reduced-motion by conditionally disabling the animation or avoiding automatic startAnimation calls for users who opt out.
- Keep the icon from being the only signal of a loading or status change; pair it with text or an aria-live announcement.
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 "Tornado" component (lucide-animated/tornado) from its shadcn registry.1. Install it with: npx shadcn@latest add https://lucide-animated.com/r/tornado.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, ...props.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { TornadoIcon } from '@/components/ui/tornado'; export default function Example() { return <TornadoIcon className='text-foreground' />; }```Files & dependencies
- tornado.tsx