JGuang

Icon Cloud

Icon Cloud · Magic UI

Preview
npx shadcn@latest add https://jiguang132.com/r/magic-ui/icon-cloud.json

Some upstream demos use online images, videos or tweets. That content depends on network access and third-party services.

Icon Cloud

Install: npx shadcn@latest add https://jiguang132.com/r/magic-ui/icon-cloud.json

Use case

Arrange images or rendered icons in a rotating Canvas cloud.

Native props used by the examples

Extracted from all local examples for this entry, grouped by imported module and native owner, including other Magic components used by compound demos. This is not an exhaustive API or a universal host variant. Inspect spread object declarations and the source types/defaults below.

Owning component propExplanationExample source
IconCloud.images (icon-cloud)Image source list rendered by IconCloud.examples/icon-cloud-demo.tsx、examples/icon-cloud-demo-2.tsx
IconCloud.icons (icon-cloud)React icon elements rendered by IconCloud.examples/icon-cloud-demo-3.tsx

Interaction and state checks

  • Icon Cloud Demo — icon-cloud-demo
  • Icon Cloud Demo 2 — icon-cloud-demo-2
  • Icon Cloud Demo 3 — icon-cloud-demo-3

These names identify real example entries, not new component props or extra components. Check pointer/keyboard behavior, themes, small screens and failures for the selected example. Decorative effects must not invent disabled/error/submission states. Complete example installation includes the actual dependency closure.

Business integration boundary

Needs Canvas and valid media; external images may fail or taint drawing. No icon search/download service is included.

Host and motion setup

Initialize Tailwind CSS v4, semantic CSS variables and the dark variant; import the independent local Registry namespace. Reuse an existing next-themes Provider without substituting JGuang UI/Base UI/HeroUI APIs. Mount effects in view and unmount offscreen; provide static alternatives for unavailable Canvas/WebGL or failed remote media. Respect prefers-reduced-motion and verify timer/RAF/observer/listener cleanup: stopping CSS alone does not prove the engine stopped. Examples provide no backend, login, payment or real AI stream. This practical guide is bilingual; detailed upstream references and demo text retain their original language.

Available examples

icon-cloud-demo, icon-cloud-demo-2, icon-cloud-demo-3

Demo state and mock data do not provide a backend service. Inspect the component props before wiring real data.

Installation

<Tabs defaultValue="cli"> <TabsList> <TabsTrigger value="cli">CLI</TabsTrigger> <TabsTrigger value="manual">Manual</TabsTrigger> </TabsList> <TabsContent value="cli">
npx shadcn@latest add @magicui/icon-cloud
</TabsContent> <TabsContent value="manual"> <Steps>

<Step>Copy and paste the following code into your project.</Step>

</Steps> </TabsContent> </Tabs>

With Images

With SVG Icons

Usage

import { IconCloud } from "@/components/ui/icon-cloud"
<div className="relative overflow-hidden">
  <IconCloud images={images} />
</div>

Props

PropTypeDefaultDescription
iconsReact.ReactNode[][]Array of icons to render in the cloud
imagesstring[][]Array of image URLs to render in the cloud
showControlbooleantrueShow play/pause control button

Accessibility

The cloud rotates automatically, so it ships with a play/pause control by default to satisfy WCAG 2.1 SC 2.2.2 (Pause, Stop, Hide).

Rotation also pauses automatically when the user has prefers-reduced-motion: reduce enabled. Setting showControl={false} removes the only way to resume it, so opt out only when your layout provides its own control.

Complete example installation

The component command installs the component. Each example command also includes its actual imported components, native support UI, utilities and pinned dependencies. Helpers are not additional catalog components.

Icon Cloud Demo

npx shadcn@latest add https://jiguang132.com/r/magic-ui/examples/icon-cloud/icon-cloud-demo.json

Default import: @/components/magicui/examples/icon-cloud-demo

Dependencies: @radix-ui/react-slot@1.3.0, class-variance-authority@0.7.1, clsx@2.1.1, lucide-react@1.24.0, tailwind-merge@3.6.0

Icon Cloud Demo 2

npx shadcn@latest add https://jiguang132.com/r/magic-ui/examples/icon-cloud/icon-cloud-demo-2.json

Default import: @/components/magicui/examples/icon-cloud-demo-2

Dependencies: @radix-ui/react-slot@1.3.0, class-variance-authority@0.7.1, clsx@2.1.1, lucide-react@1.24.0, tailwind-merge@3.6.0

Icon Cloud Demo 3

npx shadcn@latest add https://jiguang132.com/r/magic-ui/examples/icon-cloud/icon-cloud-demo-3.json

Default import: @/components/magicui/examples/icon-cloud-demo-3

Dependencies: @radix-ui/react-slot@1.3.0, class-variance-authority@0.7.1, clsx@2.1.1, lucide-react@1.24.0, tailwind-merge@3.6.0

Minimal usage and theme

import Demo from '@/components/magicui/examples/icon-cloud-demo';
import { ThemeProvider } from 'next-themes';
export default function Example() {
  return <ThemeProvider attribute="class" defaultTheme="system" enableSystem><Demo /></ThemeProvider>;
}

Initialize Tailwind CSS v4, semantic color variables and the dark variant first. Reuse an existing next-themes provider rather than nesting another. Next Link examples require a Next.js environment; in static Vite projects adapt the demo links to your router without changing the native component API. Some media and tweets require network access. Examples do not supply authentication or backend services.

Source-backed parameter reference

Implementation signatures and types are generated from the pinned local source. Optional props, native inherited types, union branches and never exclusions are preserved. A forwardRef implementation's ref is a React reference, not an additional business prop.

IconCloud({
  icons,
  images,
  showControl = true,
}: IconCloudProps)
interface IconCloudProps {
  icons?: React.ReactNode[]
  images?: string[]
  showControl?: boolean
}

Destructuring defaults in source

Only defaults written directly in parameter/props destructuring are listed. Conditional expressions, runtime theme and computed values require source inspection; this is not an exhaustive behavior-default list.

// IconCloud
showControl = true

Native and external types

External types remain defined by React or native dependencies, not manually expanded into guessed props. The installed version's TypeScript definitions are authoritative.

React.ReactNode