Snappy UI Logo

Icon Cloud

Display icons in an engaging 3D cloud with full interactivity and control.

Basic Usage


Installation

pnpm dlx shadcn@latest add http://snappyui.in/api/registry/iconcloud

IconCloud

NameTypeDefaultDescription
iconSlugsstring[]-Array of icon slugs matching Simple Icons

Cloud

See all options: Tag Canvas Options

NameTypeDefaultDescription
canvasPropsHTMLAttributes<HTMLCanvasElement> | undefined-Props passed to the canvas
childrenTag[][]-Tags rendered using renderers
containerPropsHTMLAttributes<HTMLDivElement> | undefined-Props passed to the root div
idstring | number | undefineduuidProvide when using SSR
maxSpeednumber0.04Rotation speed at idle
minSpeednumber0.02Rotation speed on hover
dragControlbooleanfalseEnable drag interaction
dragThresholdnumber4Distance to detect drag
decelnumber0.95Deceleration after mouse leave
freezeDecelbooleanfalseFreeze cloud when dragging stops

renderSimpleIcon

Used to create a tag for the Cloud component.

NameTypeDefaultDescription
aPropsHTMLAttributes<HTMLDivElement> | undefined-Anchor tag props
bgHexstring | undefined'#fff'Background hex used for contrast check
fallbackHexstring | undefined'#000'Fallback color if contrast is low
iconany-Imported simple-icon
imgPropsHTMLAttributes<HTMLDivElement> | undefined-Image tag props
minContrastRationumber | undefined10-21Minimum contrast ratio
sizenumber | undefined42Icon size in pixels

fetchSimpleIcons

Used when static imports are not possible.

NameTypeDefaultDescription
slugsstring[]-Array of slugs to fetch SVGs and colors for use with renderSimpleIcon

On this page