Eclipse Scene
Solar eclipse background: a dark moon disc with a thin warm rim and a soft blurred corona on a near-black ground. Static, with an adjustable disc size, for astronomy and space themed heroes.
The source comes with full access.
One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.
Installation
pnpm dlx shadcn@latest add @01orbital/eclipse-scenenpx shadcn@latest add @01orbital/eclipse-sceneyarn dlx shadcn@latest add @01orbital/eclipse-scenebunx --bun shadcn@latest add @01orbital/eclipse-sceneUsage
"use client"
import { useEffect, useRef, useState } from "react"
import { EclipseScene } from "@/components/scene/eclipse-scene"
export default function EclipseSceneDemo() {
const frameRef = useRef<HTMLDivElement>(null)
const [size, setSize] = useState(150)
useEffect(() => {
const frame = frameRef.current
if (!frame) return
const observer = new ResizeObserver(([entry]) => {
const { width, height } = entry.contentRect
// The corona is 1.19× the disc, centered at 46% height. Reserve
// 42px for its 14px blur on each side, plus 14px of breathing room.
setSize(
Math.max(
0,
Math.min(520, (width - 112) / 1.19, (height * 0.92 - 112) / 1.19)
)
)
})
observer.observe(frame)
return () => observer.disconnect()
}, [])
return (
<div ref={frameRef} className="relative isolate min-h-full w-full flex-1">
<EclipseScene size={size} />
</div>
)
}This example installs with everything it uses:
pnpm dlx shadcn@latest add @01orbital/eclipse-scene-demonpx shadcn@latest add @01orbital/eclipse-scene-demoyarn dlx shadcn@latest add @01orbital/eclipse-scene-demobunx --bun shadcn@latest add @01orbital/eclipse-scene-demoExamples
Teal Grandeclipse-scene-teal-grand
Eclipse Scene Teal Grand: an example of eclipse-scene.
The source comes with full access.
One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.
pnpm dlx shadcn@latest add @01orbital/eclipse-scene-teal-grandnpx shadcn@latest add @01orbital/eclipse-scene-teal-grandyarn dlx shadcn@latest add @01orbital/eclipse-scene-teal-grandbunx --bun shadcn@latest add @01orbital/eclipse-scene-teal-grandWineeclipse-scene-wine
Eclipse Scene Wine: an example of eclipse-scene.
The source comes with full access.
One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.
pnpm dlx shadcn@latest add @01orbital/eclipse-scene-winenpx shadcn@latest add @01orbital/eclipse-scene-wineyarn dlx shadcn@latest add @01orbital/eclipse-scene-winebunx --bun shadcn@latest add @01orbital/eclipse-scene-wineAPI reference
A total eclipse on its own near-black ground: dark disc, warm rim, soft corona.
Prop
Type
It also accepts the HTML attributes of the element it renders.
Dependencies
npm: cn. The CLI installs it for you.
Used in blocks
One block is built with Eclipse Scene.
Last updated on