GifproGifpro

Auto-Play Carousel Prompt: Vanilla JS AI Code Example

CODE PREVIEW

エディタを読み込み中…
P

Prompt

Create an auto-playing image carousel with navigation dots using vanilla JavaScript. Include pause on hover functionality.

この自動再生カルーセルは3秒ごとに画像を切り替えます。ホバーで一時停止、ドットクリックでナビゲーション。純粋なJavaScriptで構築。

Prompt Overview

This prompt targets front-end developers and designers who need a lightweight, dependency-free image carousel built with plain JavaScript. By specifying vanilla JS, it avoids the overhead of jQuery or third-party libraries, making the result easy to drop into any project regardless of framework. The auto-play feature keeps content moving without user interaction, while the navigation dots give visitors clear visual feedback about their position in the slide sequence.

The pause-on-hover requirement is a thoughtful usability detail — it ensures users can read or examine a slide without the carousel advancing unexpectedly. This kind of prompt is ideal for portfolio pages, product showcases, or hero sections on landing pages. To get the best results, try this prompt with GPT-4o or Claude 3.5 Sonnet, and consider adding variations such as custom transition speed, swipe support for mobile, or keyboard arrow navigation to tailor the component further.

Was this prompt helpful?

Comments

Comments appear after moderation

この記事が役に立ったら投げ銭で応援

Apple Pay / Google Pay / カード (Visa/Mastercard/JCB/Amex) / Link / Alipay / WeChat Pay 対応 · Stripeで安全に決済

開発者が選ぶ最強ツール集

運営者が毎日使っているツール・ガジェット 6選

見る
Homeヘルプ