pastetaste
Solar Arc
The day as a dotted arc from sunrise to sunset with the sun at the current time, the clock in the middle and a night state. Times from props or the sunrise equation; drag the sun to preview, it springs back.
Paste it into Claude Code: it installs the component, asks for your brand and content, and places it on the page you name.
Live demo. Move the mouse and scroll inside it.
Install
Or by hand, in a Next.js project with shadcn set up. It writes components/pastetaste/solar-arc.tsx.
npx shadcn@latest add https://pastetaste.com/r/solar-arc.jsonDependenciesmotion@^12.23.0widget-frame
Prompt
Install the pastetaste component "Solar Arc" (solar-arc) into this Next.js project and use it.
What it is: The day as a dotted arc from sunrise to sunset with the sun at the current time, the clock in the middle and a night state. Times from props or the sunrise equation; drag the sun to preview, it springs back.
Before you place it, ask me (one short message, in my language; "skip" = sensible default): which page and section it goes in, my brand colour (hex), the text, labels or images it should show, and whether I want my logo or my own copy in the demo content. Then:
Steps:
1. If the project has no components.json, run: npx shadcn@latest init -y -d. Then run: npx shadcn@latest add https://pastetaste.com/r/solar-arc.json
(it writes components/pastetaste/solar-arc.tsx and its pastetaste dependencies: widget-frame; install any npm packages it reports: motion@^12.23.0).
2. Import it: import { SolarArc } from "@/components/pastetaste/solar-arc" (check the file for the exact named export).
3. Put it where it fits on the page I name, keep the rest of the page untouched, and pass props for my colours instead of editing the installed file.
4. It does not depend on Tailwind; colours come from CSS variables (--pt-*) or props.
5. It supports prefers-reduced-motion with a still state; do not remove it.
Props (all optional unless the type has no default):
- sunrise / sunset: string | number = '06:12' / '18:04' — Times as 'HH:MM' or minutes after midnight. Ignored when location is set.
- time: string | number = live clock — The current time as 'HH:MM' or minutes after midnight. Without it the card follows the clock (updated every 15 s after mount).
- location: { lat: number; lon: number; timeZone?: string } — Compute today's sunrise and sunset for a place with the sunrise equation; timeZone is an IANA name and defaults to the viewer's.
- scrub: boolean = true — Drag the sun, or use arrow keys (±15 min), Page keys (±1 h), Home or Escape (back to now), to preview another time. The sun springs back on release or blur.
- hour12: boolean = false — Show the clock and the end times in 12-hour form with AM or PM.
- caption: string = today's date — Mono caption top left, e.g. a city name.
- tone / accent: WidgetTone / string = 'dark' / token — Tile surface and the one accent colour (the sun and the elapsed dots).
- solarTimes(when, lat, lon, tz?): (…) => { sunrise: number; sunset: number } | null — Named export: sunrise and sunset in minutes after local midnight, or null in polar day or night.
Live preview: https://pastetaste.com/c/solar-arc
Then run the dev server, check it in the browser at desktop and mobile width, and tell me the page URL.Props 8
| Prop | Type | Default | Description |
|---|---|---|---|
| sunrise / sunset | string | number | '06:12' / '18:04' | Times as 'HH:MM' or minutes after midnight. Ignored when location is set. |
| time | string | number | live clock | The current time as 'HH:MM' or minutes after midnight. Without it the card follows the clock (updated every 15 s after mount). |
| location | { lat: number; lon: number; timeZone?: string } | - | Compute today's sunrise and sunset for a place with the sunrise equation; timeZone is an IANA name and defaults to the viewer's. |
| scrub | boolean | true | Drag the sun, or use arrow keys (±15 min), Page keys (±1 h), Home or Escape (back to now), to preview another time. The sun springs back on release or blur. |
| hour12 | boolean | false | Show the clock and the end times in 12-hour form with AM or PM. |
| caption | string | today's date | Mono caption top left, e.g. a city name. |
| tone / accent | WidgetTone / string | 'dark' / token | Tile surface and the one accent colour (the sun and the elapsed dots). |
| solarTimes(when, lat, lon, tz?) | (…) => { sunrise: number; sunset: number } | null | - | Named export: sunrise and sunset in minutes after local midnight, or null in polar day or night. |