Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic
Display

Marquee <pm-marquee>

Marquee: a row of items that scrolls by without end, for customer logos, testimonials or a ticker.

Full screen
NorthwindContosoFabrikamTailspinAdatumLitware

“We shipped the redesign in a week.”

Ada, Northwind

“The first theme our designers did not fight.”

Grace, Contoso

“Dark mode was one line.”

Linus, Fabrikam

“Our forms pass every audit now.”

Mina, Tailspin

Props

<script type="module"> import '@prismora/css'; import '@prismora/elements/marquee'; </script> <pm-marquee label="Customers" fade> <span class="pm-tag" data-size="lg">Northwind</span> <span class="pm-tag" data-size="lg">Contoso</span> <span class="pm-tag" data-size="lg">Fabrikam</span> <span class="pm-tag" data-size="lg">Tailspin</span> <span class="pm-tag" data-size="lg">Adatum</span> <span class="pm-tag" data-size="lg">Litware</span> </pm-marquee> <pm-marquee label="What customers say" vertical speed="24" fade style="--pm-marquee-size: 14rem; --pm-marquee-gap: var(--pm-space-3); inline-size: min(100%, 22rem)"> <div class="pm-card" data-size="sm"> <p>“We shipped the redesign in a week.”</p> <p class="pm-muted pm-text-sm">Ada, Northwind</p> </div> <div class="pm-card" data-size="sm"> <p>“The first theme our designers did not fight.”</p> <p class="pm-muted pm-text-sm">Grace, Contoso</p> </div> <div class="pm-card" data-size="sm"> <p>“Dark mode was one line.”</p> <p class="pm-muted pm-text-sm">Linus, Fabrikam</p> </div> <div class="pm-card" data-size="sm"> <p>“Our forms pass every audit now.”</p> <p class="pm-muted pm-text-sm">Mina, Tailspin</p> </div> </pm-marquee>

Overview

Put the items in it. To loop without a gap the element adds copies of them after your own (marked data-pm-copy, hidden from assistive technology and from the keyboard); your items are not moved or changed. It pauses while the pointer is over it or focus is inside it, and a "Pause" button appears on keyboard focus. With reduced motion (the system setting, or motion="none" / "reduced") it does not move: the items become a row the reader scrolls. A sideways marquee is as wide as its container (its items never widen a grid or flex parent); vertical needs a height: set --pm-marquee-size.

Attributes

AttributeTypeDefaultDescription
labelstring—Accessible name of the group, e.g. "Customers".
speednumber40Speed in pixels per second (default 40).
verticalbooleanfalseScroll upwards instead of sideways.
reversebooleanfalseScroll the other way.
pause'hover' | 'never'—hover (default) pauses under the pointer and while focus is inside; never keeps moving.
pausedbooleanfalseStopped. Set it, or call stop() and play().
fadebooleanfalseFade the two edges out.
pause-label
prop: pauseLabel
string—Text of the pause button (default "Pause").
play-label
prop: playLabel
string—Text of the button while paused (default "Play").

Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.

Slots

SlotDescription
(default)The items (logos, cards, text).

CSS parts

PartDescription
::part(base)The clipping container.
::part(track)One run of the items.

Methods

stop(), play(), refresh()

Used in templates

Landing page