Marquee
A strip that scrolls its items in a continuous loop, for logo walls, testimonials and ticker tapes.
Attributes
| Name | Type | Default | Description |
|---|---|---|---|
orientation | MarqueeOrientation | horizontal | Direction of travel: horizontal moves toward the inline start (left in a left-to-right page), vertical moves up. |
reverse | boolean | false | Moves the items the other way: toward the inline end, or down. |
paused | boolean | false | Stops the motion where it is. |
Slots
| Name | Description |
|---|---|
(default) | The items, one per child element. Text directly inside the element is not shown. |
CSS parts
Shadow DOM styling hooks used with ::part(name). Prefer CSS custom properties when they cover the change.
| Name | Description |
|---|---|
viewport | The clipping window around the moving items. |
item | The moving wrapper around each child of the default slot; one child is assigned to each wrapper. |
CSS custom properties
Grouped by semantic target and state from --c2-<component>__<target>__<state>--<property>. Click a group to collapse it; click a name to copy it.
| Name | Type | Default | Description |
|---|---|---|---|
--c2-marquee--speed | number | 40 | Speed in pixels per second (a positive number without a unit). |
--c2-marquee__item--gap | pixel | 32px | Space after each item. |
--c2-marquee__item--align | alignment | center | Cross-axis alignment of items of different sizes: start, center, end or stretch. A vertical strip stretches its items until this is set. |
--c2-marquee__viewport--fade | pixel | 0px | Length of the fade to transparent at both ends of the strip. |
--c2-marquee__viewport--height | pixel | 240px | Height of a vertical strip. |
--c2-marquee__viewport__focus--outline | outline | 2px solid rgba(2, 101, 220, 0.4) | Focus ring of the strip when it takes keyboard focus under reduced motion. |