Skip to content
Magic UI SolidMagicUI Solid

Cool Mode

Cool mode effect for buttons, links, and other DOMs

@/demos/CoolModeDemo.tsx
import { Button } from '@/components/ui/button'
import { CoolMode } from '@/registry/magicui/cool-mode'
export function CoolModeDemo() {
return (
<div class="relative justify-center">
<CoolMode>
<Button>Click Me!</Button>
</CoolMode>
</div>
)
}
Terminal window
pnpm dlx shadcn@latest add @magicui-solid/cool-mode
@/demos/CoolModeCustomDemo.tsx
import { Button } from '@/components/ui/button'
import { CoolMode } from '@/registry/magicui/cool-mode'
export function CoolModeCustomDemo() {
return (
<div class="relative justify-center">
<CoolMode
options={{
particle: 'https://avatars.githubusercontent.com/u/81306489',
}}
>
<Button>Click Me!</Button>
</CoolMode>
</div>
)
}
import { CoolMode } from "@/components/magicui/cool-mode"
<CoolMode>
<button>Click me</button>
</CoolMode>
Prop Type Default Description
particle string "circle" The particle URL for a custom particle
size number Varies Size of the particle
particleCount number Varies The number of particles to generate
speedHorz number Varies Horizontal speed of the particles
speedUp number Varies Upward speed of the particles

Original:

magicui.design/docs/components/cool-mode