Icon Cloud
MotionReact 3D sphere of icons that rotates on its own, spins with inertia when dragged, scales and fades items by depth and pauses when it leaves the screen.
Installation
npx shadcn@latest add @minidev/icon-cloud
MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/icon-cloud.json
Usage
import { IconCloud } from "@/components/ui/icon-cloud"
export function Example() {
return (
<IconCloud />
)
}
API reference
| Prop | Type | Default |
|---|---|---|
| childrenItems to place on the sphere. Defaults to 30 lucide icons. | React.ReactNode | - |
| sizeDiameter in pixels. Shrinks to fit a narrower container. | number | 360 |
| speedIdle spin speed. 1 is one turn every 25 seconds, 0 holds still until dragged. | number | 1 |
| itemSizeSize of each tile in pixels. | number | 48 |
| interactiveAllow pointer drag and arrow keys to turn the sphere. | boolean | true |
| className | string | - |
When to use
Use it for "works with everything" integration and stack sections. Items are decorative (hidden from screen readers), so say what they are in nearby text. For a world map of places use Globe.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Focuses the sphere when interactive is on (the default). |
| ArrowLeftorArrowRight | Gives the sphere a sideways push. Under reduced motion it turns one fixed step instead. |
| ArrowUporArrowDown | Tilts the sphere up or down. |
Accessibility
- The wrapper is a
role="group"named "Rotating cloud of N icons", with ansr-onlyhint about dragging and arrow keys linked througharia-describedby. - Each tile is
aria-hidden, so describe the items in nearby text. - Under reduced motion there is no idle spin and no inertia after a drag.
Frequently asked questions
How do I use my own logos in IconCloud?
Pass them as children: each child becomes one tile on the sphere, itemSize pixels square (48 by default). Without children it shows 30 lucide icons. Positions are computed the same way on the server and the client, so the sphere is already in place in the server HTML.
Can the icons be links?
Avoid it. Every tile is aria-hidden, so a link inside would be focusable but unnamed for screen readers. Put the list of integrations in nearby text, and keep the cloud decorative.
How do I stop it from spinning or being dragged?
speed={0} holds it still until someone drags it. interactive={false} turns off dragging and the arrow keys and takes it out of the Tab order.
Dependencies
npm
Built from
Examples
Text tiles
Children replace the icons; any small node works, here the currencies Lumen settles in, on a smaller sphere.
Beside a headline
A faster, hands off sphere makes a hero visual; interactive false also removes it from the tab order.
Still until dragged
speed 0 holds the sphere until someone drags it or presses an arrow key; it then coasts to a stop on its own.