Back to MomentsYou are on Eclipse Half.

Moment

Eclipse Half

A light that can be half swallowed by a dark disc, with the corona left glowing.

live
Click or press Space · The moon slides over the sun, leaving a thin ring of light.eclipse-half.tsx
01

Installation

The registry item ships the component, the shared moment primitives and the reduced-motion hook. Nothing else is pulled in.

npx shadcn@latest add https://prequeluianimate.terravidhal.me/r/eclipse-half.json

Installs to components/prequelui/moments/eclipse-half.tsx.

02

Usage

The component owns its state and its keyboard handling. Drop it in anywhere; pass preview only when another surface, like the gallery card, should drive the gesture for a moment.

usage.tsx
import { EclipseHalf } from "@/components/prequelui/moments/eclipse-half";

export default function Demo() {
  return <EclipseHalf />;
}
03

Gesture and motion

Gesture

Click or press Space

Reaction

The moon slides over the sun, leaving a thin ring of light.

  • Only transform, opacity, clip-path and filter are animated; the layout is never measured on every frame.
  • The pointer and keyboard share the same state, so a drag can be continued with arrow keys.
  • Releasing retargets the running spring instead of restarting it.
  • With reduced motion, the state still changes but nothing travels or loops.
spring 620 / 32transform + opacitykeyboard firstreduced motion
04

API Reference

Every moment exposes the same two props plus its own internal state. The root carries the right ARIA role: switch, slider, tab, checkbox, progressbar, dialog or button.

EclipseHalf

PropTypeDefault
classNamestring—
previewbooleanfalse