# Icon Cloud

> React 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.

- Kind: Motion component (Motion)
- Docs: https://ui.minidev.pro/docs/icon-cloud
- Source (registry JSON with the full file): https://ui.minidev.pro/r/icon-cloud.json
- License: MIT. One file, yours to edit after install.

## 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.

## Installation

### shadcn CLI (copies the source into your project)

```bash
npx shadcn@latest add @minidev/icon-cloud
```

Writes `components/ui/icon-cloud.tsx` and installs its npm dependencies. Older CLI versions: `npx shadcn@latest add https://ui.minidev.pro/r/icon-cloud.json`.

### npm package

```bash
npm i minidev-ui-kit lucide-react motion
```

Add the tokens to your global stylesheet once:

```css
@import "tailwindcss";
@import "minidev-ui-kit/styles.css";
@source "../node_modules/minidev-ui-kit";
```

Next.js also needs `transpilePackages: ["minidev-ui-kit"]` in next.config.

## Import

After the shadcn install:

```tsx
import { IconCloud } from "@/components/ui/icon-cloud"
```

From the npm package:

```tsx
import { IconCloud } from "minidev-ui-kit/premium/icon-cloud"
```

## Usage

```tsx
import { IconCloud } from "@/components/ui/icon-cloud"

export function Example() {
  return (
    <IconCloud />
  )
}
```

## Props

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `children` | `React.ReactNode` | - | no | Items to place on the sphere. Defaults to 30 lucide icons. |
| `size` | `number` | `360` | no | Diameter in pixels. Shrinks to fit a narrower container. |
| `speed` | `number` | `1` | no | Idle spin speed. 1 is one turn every 25 seconds, 0 holds still until dragged. |
| `itemSize` | `number` | `48` | no | Size of each tile in pixels. |
| `interactive` | `boolean` | `true` | no | Allow pointer drag and arrow keys to turn the sphere. |
| `className` | `string` | - | no |  |

## Examples

### Text tiles

Children replace the icons; any small node works, here the currencies Lumen settles in, on a smaller sphere.

```tsx
const CURRENCIES = ["USD", "EUR", "GBP", "INR", "BRL", "JPY", "CAD", "AUD", "CHF", "SGD", "MXN", "SEK", "NOK", "NZD", "ZAR", "AED"]

<IconCloud size={300} itemSize={52}>
  {CURRENCIES.map((c) => (
    <span key={c} className="font-mono text-xs font-medium tracking-[0.04em]">{c}</span>
  ))}
</IconCloud>
```

### Beside a headline

A faster, hands off sphere makes a hero visual; interactive false also removes it from the tab order.

```tsx
<section className="grid w-full items-center gap-8 lg:grid-cols-2">
  <div className="space-y-4">
    <p className="text-xs font-medium tracking-[0.06em] text-accent-fg uppercase">Integrations</p>
    <h2 className="text-3xl font-medium tracking-[-0.03em] text-fg">Lumen talks to the tools Northwind already runs</h2>
    <p className="max-w-md text-sm leading-[1.55] text-fg-muted">Thirty native connectors, webhooks for the rest, and an API that mirrors the app.</p>
    <Button variant="outline">Browse integrations <ArrowRightIcon /></Button>
  </div>
  <IconCloud size={320} speed={1.6} interactive={false} />
</section>
```

### 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.

```tsx
<IconCloud speed={0} size={280} itemSize={40} />
```

## Keyboard interactions

| Key | Action |
| --- | --- |
| `Tab` | Focuses the sphere when `interactive` is on (the default). |
| `ArrowLeft` or `ArrowRight` | Gives the sphere a sideways push. Under reduced motion it turns one fixed step instead. |
| `ArrowUp` or `ArrowDown` | Tilts the sphere up or down. |

## Accessibility

- The wrapper is a `role="group"` named "Rotating cloud of N icons", with an `sr-only` hint about dragging and arrow keys linked through `aria-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.

## FAQ

### 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.

## Rules for generating code

- Use semantic tokens only (bg, surface, sunken, border, fg, fg-muted, fg-subtle, ink, accent, success, warning, danger). Never raw hex or palette steps like blue-500.
- Shadows only from the set: shadow-xs, shadow-sm, shadow-raised, shadow-md, shadow-lg, shadow-overlay.
- Numbers use tabular-nums. Dark mode is the `dark` class on <html>; components never branch on theme.

## Dependencies

- npm: `lucide-react`, `motion`

## Related

- [Globe](https://ui.minidev.pro/docs/globe/md): React dotted globe drawn on a plain canvas without WebGL, with auto rotation, drag with inertia, keyboard control and labelled markers joined by arcs.
- [Orbiting Circles](https://ui.minidev.pro/docs/orbiting-circles/md): Icons orbit a central hub on hairline rings for integration sections. Set radius, speed and direction per ring; icons stay upright while they travel.
- [Animated Feature Row](https://ui.minidev.pro/docs/animated-feature-row/md): A row of feature cards that slide up with a staggered delay when scrolled into view. Pass title and description pairs; reduced motion keeps them still.
- [Card Tilt](https://ui.minidev.pro/docs/card-tilt/md): A card that tilts in 3D toward the pointer on springs, with an accent glare that follows the cursor. It stays flat when reduced motion is preferred.
- [Cursor Spotlight Panel](https://ui.minidev.pro/docs/cursor-spotlight-panel/md): A panel whose accent radial spotlight follows the cursor, driven by Framer Motion values without re-renders. It shows a still surface for reduced motion.
- [Device Frame Stack](https://ui.minidev.pro/docs/device-frame-stack/md): Three device frames labelled mobile, app and docs that spring into a fanned, rotated stack when scrolled into view. Works as a hero or feature visual.

---

All 557 components: https://ui.minidev.pro/llms.txt (full text: https://ui.minidev.pro/llms-full.txt).
