Marketing sectionsMarqueeLogos
Searchastronomic.dev# MarqueeLogos
For client names or logos that scroll slowly in a row, with a label and the page's pause button.
Interactive: inline script.
## Usage
```astro
import MarqueeLogos from "@astronomic-dev/ui/components/MarqueeLogos.astro";
```
## Examples
### Client logos
The label in a start column beside the moving row from a 48rem marquee container (about one to three), above it below that. The marks are fictional samples in a fixed mid-gray; the first is a link.
```astro
---
import MarqueeLogos from "@astronomic-dev/ui/components/MarqueeLogos.astro";
import type { UiImage } from "@astronomic-dev/ui/lib/image.ts";
// Plain sample marks with a fixed mid-gray fill: an image logo keeps its own colors, so these read on a light and a
// dark page. Fictional companies, drawn for the examples.
import Fernhill from "../../logos/sample-fernhill.svg";
import Kestrel from "../../logos/sample-kestrel.svg";
import Oakridge from "../../logos/sample-oakridge.svg";
import Quarry from "../../logos/sample-quarry.svg";
import Tidewater from "../../logos/sample-tidewater.svg";
const image = (svg: { src: string; width: number; height: number }): UiImage => ({ src: svg.src, width: svg.width, height: svg.height, alt: "" });
const clients = [
{ name: "Kestrel", logo: image(Kestrel), href: "#kestrel" },
{ name: "Fernhill", logo: image(Fernhill) },
{ name: "Tidewater", logo: image(Tidewater) },
{ name: "Quarry", logo: image(Quarry) },
{ name: "Oakridge", logo: image(Oakridge) },
];
---
<div class="mx-auto max-w-6xl px-6 py-12">
<MarqueeLogos label="Trusted by 40 studios since 2024" items={clients} />
</div>
```
### With the pause button
pause: the page's one Pause motion button under the label. A press stops every marquee on the page for the visit; a second press starts them again.
```astro
---
import MarqueeLogos from "@astronomic-dev/ui/components/MarqueeLogos.astro";
import type { UiImage } from "@astronomic-dev/ui/lib/image.ts";
// Plain sample marks with a fixed mid-gray fill: an image logo keeps its own colors, so these read on a light and a
// dark page. Fictional companies, drawn for the examples.
import Fernhill from "../../logos/sample-fernhill.svg";
import Kestrel from "../../logos/sample-kestrel.svg";
import Oakridge from "../../logos/sample-oakridge.svg";
import Quarry from "../../logos/sample-quarry.svg";
import Tidewater from "../../logos/sample-tidewater.svg";
const image = (svg: { src: string; width: number; height: number }): UiImage => ({ src: svg.src, width: svg.width, height: svg.height, alt: "" });
const clients = [
{ name: "Kestrel", logo: image(Kestrel), href: "#kestrel" },
{ name: "Fernhill", logo: image(Fernhill) },
{ name: "Tidewater", logo: image(Tidewater) },
{ name: "Quarry", logo: image(Quarry) },
{ name: "Oakridge", logo: image(Oakridge) },
];
---
<div class="mx-auto max-w-6xl px-6 py-12">
<MarqueeLogos label="Trusted by 40 studios since 2024" items={clients} pause />
</div>
```
### Label above
labelLayout="stacked": the label stays above the moving row at every width, on one line with the pause button.
```astro
---
import MarqueeLogos from "@astronomic-dev/ui/components/MarqueeLogos.astro";
const clients = [{ name: "Kestrel", href: "#kestrel" }, { name: "Fernhill" }, { name: "Tidewater" }, { name: "Quarry" }, { name: "Oakridge" }];
---
<div class="mx-auto max-w-6xl px-6 py-12">
<MarqueeLogos label="Trusted by 40 studios since 2024" labelLayout="stacked" items={clients} />
</div>
```
### A few names
Three clients with no logo image: each name shows as text, a logo tall. A short list is spread across the row, so the loop has no long gap.
```astro
---
import MarqueeLogos from "@astronomic-dev/ui/components/MarqueeLogos.astro";
const clients = [{ name: "Halvard Press", href: "#halvard" }, { name: "Linden & Rowe" }, { name: "Brightwater" }];
---
<div class="mx-auto max-w-6xl px-6 py-12">
<MarqueeLogos label="Recent clients" items={clients} speed="slow" />
</div>
```
## Props
### MarqueeLogos
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items` | `LogoStripItem[]` | None | Required. The clients, in order: { name, logo?, href?, target? }, as LogoStrip's. The name is always the logo's alt; without a logo it shows as text. An empty list stops the build. |
| `labelLayout` | `"side" \| "stacked" \| "hidden"` | `"side"` | Where the label goes (with a label, not a heading). side: in a start column beside the row from a 48rem marquee container, above it below that. stacked: above the row at every width, on one line with the pause button. hidden: not shown, still the region's name for a screen reader; use it when your own label column sits beside the strip. hidden takes no pause (the build stops): put a MotionPause in your own label column. |
| `label` | `string` | None | The region's name, such as "Recent clients", in small muted type above the row (or beside it, in MarqueeLogos). With a heading, the heading names the region instead. One of heading, label or labelledBy is required: without any the build stops. |
| `labelledBy` | `string` | None | The id of your own element that names the region, such as a label you show beside the strip. With it the part shows no label of its own and the region is named by your element only, so a screen reader hears the name once (MarqueeLogos then takes no labelLayout). One of heading, label or labelledBy is required; a heading wins over it. |
| `heading` | `string` | None | The section heading, in the section role in display type. With it, it names the region. |
| `emphasis` | `boolean` | `false` | Turn one *phrase* in the heading into <em>: exactly two asterisks around text with no space inside. Off by default, so the heading shows as typed. |
| `mark` | `string` | None | A short mark after the heading, such as "(12)", in small muted type, outside the heading. Shown only with a heading. |
| `markLabel` | `string` | None | What the mark says to a screen reader, such as "12 clients": the mark is then hidden from screen readers and this is read in its place. |
| `text` | `string` | None | One or two sentences under the heading, in the lead role, muted. Shown only with a heading. |
| `headingTag` | `"h2" \| "h3" \| "h4"` | `"h2"` | The heading element. |
| `speed` | `"slow" \| "normal" \| "fast"` | `"normal"` | How long one loop takes: the theme's --ui-marquee-duration (40s when it sets none) times 1.5 for slow, 1 for normal or 0.6 for fast. |
| `direction` | `"start" \| "end"` | `"start"` | start: the row runs toward the start of the line (left, or right on a right-to-left page). end: the other way. |
| `pause` | `boolean` | `false` | Shows the page's one MotionPause button in the header. Pass it on the first marquee of the page only: one button stops every marquee and autoplaying video. |
| `class` | `string` | None | More classes for the <section>, merged with cn(), so yours win on conflicts. The root is a named size container (inline-size containment): in a shrink-to-fit parent it collapses, so give it a width there. |
| Slot | Description |
| --- | --- |
| `eyebrow` | A short line above the heading, such as a Badge. Shown only with a heading. |
Any other attribute goes on the <section>.
## Accessibility
- It is a region (<section>) named by its heading or its label: one of them is required. The heading id is unique on the page.
- The items are a list, written twice: the first copy is the real list, the second is hidden from screen readers (aria-hidden) and inert, so a screen reader hears each item once and the Tab key reaches each link once.
- The moving row takes no focus of its own; the links inside it do. Hovering it pauses it, so a link never slides away from the pointer. Focusing a link inside it turns it still: the copy hides and the set wraps in rows, as with reduced motion, so the focused link sits whole and in view; it moves again when focus leaves.
- Still with no click needed when the reader asks for reduced motion or the theme is calm: one copy of the list, wrapping onto more lines, with nothing hidden.
- Anything that moves for more than five seconds needs a way to stop it (WCAG 2.2.2): pass pause on the page's first marquee for the one Pause motion button, which stops every marquee for the visit.
- Right to left, the row runs the other way, so start is still the start of the line.
- A logo's alt is always the item's name. A link that opens a new tab gets rel="noopener noreferrer" and the kit's focus ring.
MarqueeLogos
FreeFor client names or logos that scroll slowly in a row, with a label and the page's pause button.
- File
- MarqueeLogos.astro
- Group
- Marketing sections
- Kind
- Interactive: inline script
- Examples
- 4
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
Client logos
The label in a start column beside the moving row from a 48rem marquee container (about one to three), above it below that. The marks are fictional samples in a fixed mid-gray; the first is a link.
This preview did not load.
examples/marqueelogos/main.astro
---
import MarqueeLogos from "@astronomic-dev/ui/components/MarqueeLogos.astro";
import type { UiImage } from "@astronomic-dev/ui/lib/image.ts";
// Plain sample marks with a fixed mid-gray fill: an image logo keeps its own colors, so these read on a light and a
// dark page. Fictional companies, drawn for the examples.
import Fernhill from "../../logos/sample-fernhill.svg";
import Kestrel from "../../logos/sample-kestrel.svg";
import Oakridge from "../../logos/sample-oakridge.svg";
import Quarry from "../../logos/sample-quarry.svg";
import Tidewater from "../../logos/sample-tidewater.svg";
const image = (svg: { src: string; width: number; height: number }): UiImage => ({ src: svg.src, width: svg.width, height: svg.height, alt: "" });
const clients = [
{ name: "Kestrel", logo: image(Kestrel), href: "#kestrel" },
{ name: "Fernhill", logo: image(Fernhill) },
{ name: "Tidewater", logo: image(Tidewater) },
{ name: "Quarry", logo: image(Quarry) },
{ name: "Oakridge", logo: image(Oakridge) },
];
---
<div class="mx-auto max-w-6xl px-6 py-12">
<MarqueeLogos label="Trusted by 40 studios since 2024" items={clients} />
</div>With the pause button
pause: the page's one Pause motion button under the label. A press stops every marquee on the page for the visit; a second press starts them again.
This preview did not load.
examples/marqueelogos/with-pause.astro
---
import MarqueeLogos from "@astronomic-dev/ui/components/MarqueeLogos.astro";
import type { UiImage } from "@astronomic-dev/ui/lib/image.ts";
// Plain sample marks with a fixed mid-gray fill: an image logo keeps its own colors, so these read on a light and a
// dark page. Fictional companies, drawn for the examples.
import Fernhill from "../../logos/sample-fernhill.svg";
import Kestrel from "../../logos/sample-kestrel.svg";
import Oakridge from "../../logos/sample-oakridge.svg";
import Quarry from "../../logos/sample-quarry.svg";
import Tidewater from "../../logos/sample-tidewater.svg";
const image = (svg: { src: string; width: number; height: number }): UiImage => ({ src: svg.src, width: svg.width, height: svg.height, alt: "" });
const clients = [
{ name: "Kestrel", logo: image(Kestrel), href: "#kestrel" },
{ name: "Fernhill", logo: image(Fernhill) },
{ name: "Tidewater", logo: image(Tidewater) },
{ name: "Quarry", logo: image(Quarry) },
{ name: "Oakridge", logo: image(Oakridge) },
];
---
<div class="mx-auto max-w-6xl px-6 py-12">
<MarqueeLogos label="Trusted by 40 studios since 2024" items={clients} pause />
</div>Label above
labelLayout="stacked": the label stays above the moving row at every width, on one line with the pause button.
This preview did not load.
examples/marqueelogos/stacked.astro
---
import MarqueeLogos from "@astronomic-dev/ui/components/MarqueeLogos.astro";
const clients = [{ name: "Kestrel", href: "#kestrel" }, { name: "Fernhill" }, { name: "Tidewater" }, { name: "Quarry" }, { name: "Oakridge" }];
---
<div class="mx-auto max-w-6xl px-6 py-12">
<MarqueeLogos label="Trusted by 40 studios since 2024" labelLayout="stacked" items={clients} />
</div>A few names
Three clients with no logo image: each name shows as text, a logo tall. A short list is spread across the row, so the loop has no long gap.
This preview did not load.
examples/marqueelogos/few.astro
---
import MarqueeLogos from "@astronomic-dev/ui/components/MarqueeLogos.astro";
const clients = [{ name: "Halvard Press", href: "#halvard" }, { name: "Linden & Rowe" }, { name: "Brightwater" }];
---
<div class="mx-auto max-w-6xl px-6 py-12">
<MarqueeLogos label="Recent clients" items={clients} speed="slow" />
</div>