BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn-extras/refresh-icon

Refresh Icon

shadcn-extras/refresh-icon
FreeComponent

Animated refresh/sync icon with spin and pulse effects.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/NayanDevLab/shadcn-extras/dev/public/c/refresh-icon.json

Source

refresh-icon.tsxraw.githubusercontent.com/NayanDevLab/shadcn-extras/dev/public/c/refresh-icon.json
1'use client';
2
3import { motion, useAnimation } from 'motion/react';
4import { RefreshCcw } from 'lucide-react';
5import { cn } from '@/lib/utils';
6import { useEffect, useState } from 'react';
7
8interface RefreshIconProps {
9 className?: string;
10 color?: string;
11 size?: number;
12 isRefreshing?: boolean;
13 startOnHover?: boolean;
14 animationType?: 'spin' | 'pulse';
15}
16
17export function RefreshIcon({
18 className,
19 color = 'currentColor',
20 size = 24,
21 isRefreshing = false,
22 startOnHover = true,
23 animationType = 'spin',
24}: RefreshIconProps) {
25 const controls = useAnimation();
26 const [isHovered, setIsHovered] = useState(false);
27 const shouldAnimate = isRefreshing || (startOnHover && isHovered);
28
29 useEffect(() => {
30 if (shouldAnimate) {
31 if (animationType === 'spin') {
32 controls.start({
33 rotate: 360,
34 transition: {
35 duration: 1,
36 repeat: Infinity,
37 repeatType: 'loop',
38 ease: 'linear',
39 },
40 });
41 } else if (animationType === 'pulse') {
42 controls.start({
43 scale: [1, 1.1, 1],
44 opacity: [1, 0.7, 1],
45 transition: {
46 duration: 1.5,
47 repeat: Infinity,
48 repeatType: 'loop',
49 ease: 'easeInOut',
50 },
51 });
52 }
53 } else {
54 controls.stop();
55 if (animationType === 'spin') {
56 controls.set({ rotate: 0 });
57 } else {
58 controls.set({ scale: 1, opacity: 1 });
59 }
60 }
61 }, [shouldAnimate, animationType, controls]);
62
63 return (
64 <div
65 className={cn(
66 'relative flex cursor-pointer items-center justify-center select-none',
67 className
68 )}
69 onMouseEnter={() => setIsHovered(true)}
70 onMouseLeave={() => setIsHovered(false)}
71 >
72 <motion.div animate={controls}>
73 <RefreshCcw size={size} color={color} />
74 </motion.div>
75 </div>
76 );
77}

What it pulls in

npm packages

  • motion
  • lucide-react

Files it writes

  • \components\core\refresh-icon.tsx

Facts

Registry
shadcn-extras
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-12
Last confirmed
yesterday

Go to the source

nayanrdeveloper.github.io NayanDevLab/shadcn-extras on GitHub Raw registry item This item as JSON

More from shadcn-extras

All 33 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Animated Image Gridanimated-image-gridshadcn-extrasComponentsFreeno deps · 3 files
Blog Card Fourblog-card-fourshadcn-extrasComponentsFree1 dep
Blog Card Oneblog-card-oneshadcn-extrasComponentsFreeno deps
Blog Card Threeblog-card-threeshadcn-extrasComponentsFree1 dep
Blog Card Twoblog-card-twoshadcn-extrasComponentsFree1 dep
Bulb Iconbulb-iconshadcn-extrasComponentsFree2 deps
Chevron Stepschevron-stepsshadcn-extrasComponentsFreeno deps
Circular Gallerycircular-galleryshadcn-extrasComponentsFreeno deps · 3 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex