Marquee
Seamless infinite scroller for logos, testimonials, or a ticker.
Import
import { Marquee } from "@cronus-ui/ui";
npx cronus-ui add marquee
Examples
.cronus
The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.
default.cronus
app "audit-fixtures" {
port 5176
}
style {
preset aurora
theme dark
}
component MarqueeDefault layout:inline style:marquee {
aria-label:"Logos"
label "Logos"
text "Acme"
text "Globex"
}
page "/audit/marquee/default" type:custom {
use MarqueeDefault
}
API Reference
Generated from the component's exported types.
MarqueeProps
Extends HTMLAttributes<HTMLDivElement>
| Prop | Type | Default | Description |
|---|---|---|---|
children* | ReactNode | — | The items to scroll — logos, cards, testimonials, or a text ticker. |
direction | "left" | "right" | "left" | Scroll direction. Horizontal: `"left"` (default) | `"right"`. When is set, the same prop reads as `"up"` (default) | `"down"` — i.e. `"left"`/`"up"` share the forward sense and `"right"`/`"down"` the reverse, so one prop covers both axes. |
vertical | boolean | false | Scroll the marquee on the vertical axis instead of the horizontal one. |
speed | number | DEFAULT_SPEED | Travel speed in **pixels per second** — resolution-independent and stable across content widths (the loop duration is derived from the measured track size). Defaults to `40` (a tasteful, slow drift). |
pauseOnHover | boolean | true | Pause the scroll while the pointer is over the marquee. Defaults to `true`. |
fade | boolean | true | Fade the leading and trailing edges into the background with a gradient `mask-image`, so items dissolve rather than clip. Defaults to `true`. |
gap | string | DEFAULT_GAP | Spacing between repeated items. Accepts any CSS length. Defaults to `"1rem"`. |
repeat | number | DEFAULT_REPEAT | How many copies of are rendered back-to-back. The track translates by exactly one copy, so any count ≥ 2 loops seamlessly. Defaults to `2`; raise it when a single copy cannot fill wide viewports (leaving a visible gap before the loop point). |
motionPreference | MarqueeMotionPreference | "respect" | Whether the marquee scrolls vs. honours `prefers-reduced-motion`: `"respect"` (default), `"always"` (force motion), or `"never"` (force static). Defaults to `"respect"`. |
groupClassName | string | — | Class applied to each repeated copy (the flex row/column of items). |
className | string | — | Additional class names merged onto the root. |
id | string | — | DOM id of the root element. |