NinA AI Agency

Slide to confirm

Drag the handle to the right; past the mark it finishes on its own.

DragFree
Schuif om te bevestigenBevestigd
Works inClaude CodeChatGPT CodexGemini CLIGitHub CopilotCursorLovablev0

Prompt plus working code in one go. Paste it into Claude Code, Codex, Gemini, Copilot or Cursor.

Build an interactive UI element: Slide to confirm.

What it is: Drag the handle to the right; past the mark it finishes on its own.

Behaviour:
- Pill-shaped track of 320 x 64 px with a round white handle with an arrow on the left.
- Drag the handle to the right with pointer events (works with mouse and touch); the label in the track fades as you drag and a coloured fill grows along.
- Release past 80%: the handle slides to the end by itself, the arrow becomes a check and "Confirmed" appears. Release earlier and the handle springs back to the start with a soft ease-out.
- After 2 seconds the element resets.
- Keyboard: Enter or Space on the handle confirms straight away.

Requirements:
- Work in this project's stack. If it is React with Tailwind CSS, make a single component without extra packages; otherwise plain HTML, CSS and JavaScript.
- Fully operable with keyboard and touch, with the right aria attributes.
- Respect prefers-reduced-motion: less or no movement.
- Use the colours, fonts and border radii of my project.
- At the end, show me where the component lives and how to use it.

Keep playing