Draggable window over a curve

A dark 24 hour price chart with a fixed width window you drag along it to pick a stretch of hours.

ControlsProFrom Gudi, China experienceChinese or JapaneseAbout 2k tokens saved
The whole page

Links in the preview stay on the block.

Open on its own

The prompt

One prompt, written to stand on its own: goal, structure, type, colour, spacing, behaviour and the words in square brackets to replace. Paste it into any tool that writes HTML. The Code tab has this block as one file.

714 words
# Draggable window over a curve

One controls component, not a whole page: build it to drop into a page that already exists. Works in Claude, v0, Lovable, Bolt, Cursor or any tool that writes HTML.

## Goal
A price across 24 hours with a fixed width window dragged along it to choose when something runs. For an energy or scheduling tool on a dark page.

## Structure
1. Figure; legend: two colour keys, three band names.
2. Stage div, relative, cursor crosshair, touch-action pan-y.
3. One svg: gridlines and hour ticks, three dashed price levels with labels, the window group, the second series, the price line, a tip dot, a hover readout.
4. Over the window a div, touch-action none, the drag target; a hint line below.

The full prompt and code are part of Pro

Blocks from free pages include both at no cost.

More like this

Controls

Every controls block