marquee_scroll
Marquee Scroll is a Drupal 10/11 module that allows site builders to display text fields or custom blocks as smoothly scrolling marquee banners. It replaces the old HTML tag with a modern, CSS/JS-driven solution using requestAnimationFrame for better performance and accessibility.
Features
Field Formatter: Apply to text fields (string, string_long, text, text_long) to render their values as scrolling marquees.
Configurable Options:
Scrolling speed (px/s)
Gap between repeated text (px)
Direction: Left, Right, Up, Down
Custom Block: Add a standalone scrolling text block anywhere on your site.
Smooth Animation: Uses modern JavaScript and CSS for a fluid, GPU-friendly scrolling effect.
No Deprecated Tags: Ensures compliance with HTML5 and accessibility standards.
Installation
Place the module in modules/contrib/marquee_scroll or install via Composer:
composer require drupal/marquee_scroll
Enable the module:
drush en marquee_scroll
drush cr
Configure:
Go to Manage display of your content type, choose Marquee Scroll formatter, and set speed/gap/direction.
Requirements
PHP ≥ 8.1
Drupal core 10 or 11
Demo
Example:
Filter: [marquee speed=70 gap=40]Limited time offer — save 45%[/marquee]
Text: "Your scrolling text goes here…"