scroll-scrubbed-word-reveal
Fungsinya
Skill ini membiarkan gulir mengatur kecepatan membaca judul, kutipan, atau pernyataan, dengan setiap kata muncul secara bergantian. Cocok untuk halaman editorial dan pemasaran di mana kata-kata harus dibaca dengan ritme yang stabil.
Kapan dipakai
- โSaat kutipan atau manifesto harus muncul kata demi kata saat pembaca menggulir.
- โSaat sebuah paragraf memiliki tautan atau penekanan yang harus tetap berfungsi selama reveal.
- โSaat Anda menginginkan teks tetap terbaca di lebar layar apa pun dan dengan gerakan yang dikurangi.
Link skill
https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/scroll-scrubbed-word-reveal/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
โSaya ingin judul di manifesto saya muncul kata demi kata saat orang menggulir, tetapi tautannya tetap berfungsi.โ
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent menyimpan teks asli di halaman, membungkus kata-kata dengan span tanpa merusak tautan atau penekanan inline, lalu menetapkan nilai progres untuk setiap kata dari posisi gulir. Kata memudar dan naik saat nilai itu melewatinya.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Scroll-Scrubbed Word Reveal
Make reading progress visible without replacing real text, breaking inline markup, or depending on a fixed line count.
Prepare the text
- Keep one untouched accessible text source in the DOM.
- Walk text nodes with
TreeWalker; do not flatten the container withtextContentorinnerHTML. - Skip
script,style, form controls, and elements marked with[data-no-split]. - Replace only non-whitespace tokens with spans and preserve whitespace nodes exactly.
- Mark generated spans
aria-hidden="true"only when an equivalent unsplit accessible copy remains available.
Preferred structure:
<p class="reveal" data-reveal>
Motion should <em>explain</em> the next state, not decorate it.
</p>
Avoid line-based splitting. Browser line wraps must remain free to change with container width, language, zoom, and font loading.
Map scroll to words
Use section progress as the single source of truth:
const reveal = Math.min(1, Math.max(0, progress));
const local = Math.min(1, Math.max(0, reveal * wordCount - index));
word.style.setProperty("--word-progress", local);
Interpolate hidden opacity, blur, and vertical offset from --word-progress. Keep the visible state identical to normal typography.
Use GSAP ScrollTrigger with scrub when precise starts, ends, refresh, or a shared timeline is needed. Use a dependency-free scroll measurement plus requestAnimationFrame for a standalone section.
Set useful defaults
- Hidden opacity:
0.12โ0.3 - Blur:
4โ10px - Vertical offset:
0.08โ0.22em - Reveal span:
120โ220%of the viewport for a paragraph - Direct word overlap:
10โ30% - Easing: none for the scroll mapping; ease only the visual interpolation when needed
Expose the values as CSS custom properties. Scale the scroll span from text length rather than assuming one duration fits every passage.
Preserve emphasis
- Let links,
strong,em, marks, and accent spans keep their semantics and styling. - Use inherited color by default; style accents on the original element, not on token indexes.
- Do not reveal essential links only on hover or after the reader has passed them.
- Re-split only when the source text changes. Responsive wrapping does not require rebuilding tokens.
- Store enough state to restore the original DOM during cleanup.
Keep it readable
- Use real document flow; pin only when the copy and evidence justify a short deliberate reading beat.
- Do not use a typewriter cursor, random delays, or autoplay unless explicitly requested.
- Under
prefers-reduced-motion: reduce, show every word immediately, remove blur and transforms, and remove any pinning. - Keep screen-reader output natural and avoid announcing each word.
- Verify contrast in both the hidden and final states; hidden words may be quiet but the final text must meet the normal reading contract.
Clean up
Kill ScrollTriggers, remove scroll and resize listeners, cancel animation frames, and restore the original marked-up subtree on route change or component unmount. Refresh measurements after fonts load if start or end positions depend on text geometry.
Verify
Test inline links and emphasis, punctuation, repeated spaces, long words, 200% zoom, 390/768/1440 widths, content changes, forward and reverse scrolling, reduced motion, keyboard focus, screen-reader reading order, and teardown. The final DOM must still communicate the complete sentence with JavaScript disabled.
Use demo/index.html as the working reference and demo/PROMPT.md to recreate or remix it. Keep REFERENCES.md as the links-only implementation source list.
Pertanyaan umum
Apakah tautan di dalam teks akan rusak?
Tidak. Skill ini menyatakan markup inline tetap utuh karena hanya kata-katanya yang dibungkus.
Apakah kata-kata tetap bisa dibaca pembaca layar?
Ya. Skill ini menjaga salinan teks yang dapat diakses saat kata-kata dipecah.
Apakah teks dipecah per baris?
Tidak. Skill ini menghindari pemecahan berbasis baris agar teks bisa membungkus secara alami.
Detail
Deskripsi asli dari pembuat
Reveal marked-up text word by word as scroll progress advances, while preserving semantic inline links, emphasis, responsive line wrapping, and reduced-motion readability. Use for headlines, quotes, manifestos, product statements, onboarding messages, or editorial passages where scrolling should pace comprehension rather than simulate typing.
repo: MengTo/Skills
Popularitas
- Bintang GitHub
- 7.2k
- Peringkat
- #13464
- Lisensi
- MIT
- Diperbarui
- 1/11/2026
Komentar
- โฆ
Skill lain dari repositori ini
3d-cloth-material
7.2kMembantu agent Anda membuat kain tenun yang realistis di Three.js, dengan anyaman benang, kilau lembut, lipatan alami, kelim, dan jahitan.
3d-falling-leaves
7.2kMembantu agent Anda menambahkan daun berguguran yang realistis ke scene 3D, dengan daun yang berputar, terbawa angin, dan digunakan ulang saat kamera bergerak.
3d-four-seasons
7.2kMembantu agent Anda menambahkan tampilan musim semi, panas, gugur, dan dingin ke scene 3D, dengan mengubah dedaunan, cahaya, langit, dan salju tanpa membangun ulang scene.
3d-high-poly-models
7.2kMembantu agent Anda membangun model 3D yang detail dengan bentuk halus dan tepi yang meyakinkan, lalu menyiapkan versi lebih ringan yang berjalan baik di web.
Skill serupa
blender-motion-state-inspection
280kMemungkinkan inspeksi detail pada animasi 3D. Berguna untuk memeriksa pose, gerakan, dan keselarasan karakter dalam animasi.
manim-video
280kMemungkinkan agent Anda membuat video penjelasan animasi. Menggunakan Manim untuk membuat grafik dan diagram yang jelas untuk konsep teknis.
remotion-video-creation
280kMemandu agent Anda membuat video menggunakan React dengan library Remotion. Mencakup praktik terbaik untuk animasi, audio, caption, dan elemen visual lainnya.