BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/magicui/meteors

Meteors

magicui/meteors
FreeComponent

A meteor shower effect.

Live preview

live · rendered by the registry
Rendered by magicui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://magicui.design/r/meteors.json

Source

registry/magicui/meteors.tsxmagicui.design/r/meteors.json
1"use client"
2
3import React, { useEffect, useState } from "react"
4
5import { cn } from "@/lib/utils"
6
7interface MeteorsProps {
8 number?: number
9 minDelay?: number
10 maxDelay?: number
11 minDuration?: number
12 maxDuration?: number
13 angle?: number
14 className?: string
15}
16
17export const Meteors = ({
18 number = 20,
19 minDelay = 0.2,
20 maxDelay = 1.2,
21 minDuration = 2,
22 maxDuration = 10,
23 angle = 215,
24 className,
25}: MeteorsProps) => {
26 const [meteorStyles, setMeteorStyles] = useState<Array<React.CSSProperties>>(
27 []
28 )
29
30 useEffect(() => {
31 const styles = [...new Array(number)].map(() => ({
32 "--angle": -angle + "deg",
33 top: "-5%",
34 left: `calc(0% + ${Math.floor(Math.random() * window.innerWidth)}px)`,
35 animationDelay: Math.random() * (maxDelay - minDelay) + minDelay + "s",
36 animationDuration:
37 Math.floor(Math.random() * (maxDuration - minDuration) + minDuration) +
38 "s",
39 }))
40 setMeteorStyles(styles)
41 }, [number, minDelay, maxDelay, minDuration, maxDuration, angle])
42
43 return (
44 <>
45 {[...meteorStyles].map((style, idx) => (
46 // Meteor Head
47 <span
48 key={idx}
49 style={{ ...style }}
50 className={cn(
51 "animate-meteor pointer-events-none absolute size-0.5 rotate-(--angle) rounded-full bg-zinc-500 shadow-[0_0_0_1px_#ffffff10]",
52 className
53 )}
54 >
55 {/* Meteor Tail */}
56 <div className="pointer-events-none absolute top-1/2 -z-10 h-px w-12.5 -translate-y-1/2 bg-linear-to-r from-zinc-500 to-transparent" />
57 </span>
58 ))}
59 </>
60 )
61}

Files it writes

  • registry/magicui/meteors.tsx

Facts

Registry
magicui
Type
registry:ui
Access
Free
Files written
1
Theme wiring
ships cssVars
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

Docs on magicui magicui.design magicuidesign/magicui on GitHub Raw registry item This item as JSON

More from magicui

All 247 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AndroidandroidmagicuiComponentsFreeno deps
Animated Beamanimated-beammagicuiComponentsFree1 dep
Animated Circular Progress Baranimated-circular-progress-barmagicuiComponentsFreeno deps
Animated Gradient Textanimated-gradient-textmagicuiComponentsFreeno deps
Animated Grid Patternanimated-grid-patternmagicuiComponentsFree1 dep
Animated Listanimated-listmagicuiComponentsFree1 dep
Animated Shiny Textanimated-shiny-textmagicuiComponentsFreeno deps
Theme Toggleranimated-theme-togglermagicuiComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex