Motion FX
JS behaviour
Marquee wall
Three marquee rows at different speeds and directions, endlessly passing small testimonial cards — avatar, name, one line; hover a row and it stops right there for reading, and one button flips the direction of all three at once.
Real scenarios
The component as it is used in a product — not a specimen grid.
What eighteen teams say about Nova Metrics
Three rows, three speeds, two directions — hover a row to freeze it, press the button and every row turns around on the spot.
The dashboard loads before my coffee does.
Warehouse sync just works, every fifteen minutes.
Session replay found the bug in a single watch.
Guardrails saved the quarterly budget.
Latency from here? Twenty-six milliseconds.
The whole team reads it every morning now.
SSO was done in one afternoon.
Live queries stay fast even on today’s data.
Alerts land exactly where they should.
We used all five SDKs; one API.
The status page quieted every worry.
A transparent bill and precise guardrails.
Migrating off our old tool took one afternoon.
Every service’s spend shows on its own card.
You can feel the European edge.
Nobody writes the weekly report anymore.
Support answers in under an hour.
Our data team finally shares one tool.
Edges of the wall fade out so the cards read as passing through, not ending.
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| --mfxmq-dur | time | '38s · 26s · 32s' | One full lap per row; the rows are deliberately unsynchronised so the wall never looks uniform. |
| base-direction | normal · reverse | 'mixed' | Each row’s base direction; the flip button reverses all three together. |
| hover | state | 'paused' | Hover or focus on a row holds the marquee in place so the line can be read. |
| seamless-half | layout | 'duplicate ×2' | The second half repeats with aria-hidden and each half’s end padding matches the gap, closing the seam. |
| prefers-reduced-motion | behaviour | 'freeze' | The rows stop and the cards stay put, readable. |
Snippet
<div class="mfxmq" x-data="{ rev: false }" x-bind:data-rev="rev ? 'yes' : 'no'">
@foreach ([['slow', 'normal'], ['fast', 'reverse'], ['mid', 'normal']] as [$speed, $base])
<div class="mfxmq-row" data-speed="{{ $speed }}" data-base="{{ $base }}">
<div class="mfxmq-track">
<div class="mfxmq-half">
@foreach ($quotes as $q)
<figure class="mfxmq-card">
<span class="mfxmq-avatar">{{ $q['initials'] }}</span>
<blockquote>{{ $q['line'] }}</blockquote>
<figcaption>{{ $q['name'] }}</figcaption>
</figure>
@endforeach
</div>
<div class="mfxmq-half" aria-hidden="true"> … the same cards … </div>
</div>
</div>
@endforeach
<button class="mfxmq-flip" x-on:click="rev = !rev">Flip direction</button>
</div>
<style>
.mfxmq-row { overflow: clip; }
.mfxmq-track { display: flex; inline-size: max-content;
animation: mfxmq-run var(--mfxmq-dur) linear infinite; }
.mfxmq-half { display: flex; gap: 1rem; padding-inline-end: 1rem; }
.mfxmq-row:hover .mfxmq-track { animation-play-state: paused; }
@keyframes mfxmq-run { to { translate: -50% 0; } }
</style>
// app/Pages/Wall.jsx — Inertia (React) page; renders the React snippet
// below unchanged, with Inertia's Link wired into the provider.
import { Link } from '@inertiajs/react';
import { NabuXUIProvider } from '@nabuxai/ui-react';
import MarqueeWall from '@/components/MarqueeWall';
export default function Wall() {
return (
<NabuXUIProvider locale="en" linkComponent={Link}>
<main className="nx-page">
<MarqueeWall />
</main>
</NabuXUIProvider>
);
}
// MarqueeWall.jsx — three testimonial rows, hover-paused, one flip button
import { useState, type CSSProperties } from 'react';
import '@nabuxai/ui-core/css';
const QUOTES = [
{ id: 1, initials: 'LK', name: 'Lena · Berlin', line: 'The dashboard loads before my coffee.' },
{ id: 2, initials: 'RO', name: 'Ravi · Singapore', line: 'Warehouse sync just works, every 15 minutes.' },
{ id: 3, initials: 'AM', name: 'Aoife · Dublin', line: 'Replay found the bug in one watch.' },
{ id: 4, initials: 'JT', name: 'Jonas · Toronto', line: 'Guardrails saved the Q3 budget.' },
{ id: 5, initials: 'MS', name: 'Mei · Osaka', line: 'Latency from here? Twenty-six ms.' },
{ id: 6, initials: 'CR', name: 'Cristina · Lisbon', line: 'Our whole team reads it daily now.' },
];
const ROWS = [
{ id: 'slow', dur: '38s', base: 'normal' },
{ id: 'fast', dur: '26s', base: 'reverse' },
{ id: 'mid', dur: '32s', base: 'normal' },
];
export default function MarqueeWall() {
const [rev, setRev] = useState(false);
const half = (hidden: boolean) => (
<div className="mfxmq-half" aria-hidden={hidden || undefined}>
{QUOTES.map((q) => (
<figure className="mfxmq-card" key={q.id + (hidden ? 'b' : 'a')}>
<span className="mfxmq-avatar">{q.initials}</span>
<blockquote>{q.line}</blockquote>
<figcaption>{q.name}</figcaption>
</figure>
))}
</div>
);
return (
<>
<style>{`
.mfxmq-row { overflow: clip; }
.mfxmq-track { display: flex; inline-size: max-content;
animation: mfxmq-run var(--mfxmq-dur) linear infinite; }
.mfxmq-half { display: flex; gap: 1rem; padding-inline-end: 1rem; }
.mfxmq-row:hover .mfxmq-track, .mfxmq-row:focus-within .mfxmq-track { animation-play-state: paused; }
.mfxmq-card { display: grid; gap: .35rem; inline-size: 18rem; margin: 0; padding: 1rem;
border: 1px solid #d9dde4; border-radius: 1rem; background: #fff;
font: 400 .85rem/1.5 system-ui; }
.mfxmq-avatar { display: grid; place-items: center; inline-size: 2.25rem; aspect-ratio: 1;
border-radius: 50%; background: #4f46e5; color: #fff; font-weight: 700; }
.mfxmq-card figcaption { color: #5c6270; font-size: .75rem; }
.mfxmq-flip { border: 1px solid #d9dde4; border-radius: 999px; padding: .6rem 1.2rem;
background: #fff; cursor: pointer; }
@keyframes mfxmq-run { to { translate: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .mfxmq-track { animation: none; } }
`}</style>
{ROWS.map((row) => (
// the flip XORs each row’s base direction
<div className="mfxmq-row" key={row.id}
style={{ '--mfxmq-dur': row.dur,
animationDirection: (row.base === 'reverse') !== rev ? 'reverse' : 'normal' } as CSSProperties}>
<div className="mfxmq-track">
{half(false)}
{half(true)}
</div>
</div>
))}
<button type="button" className="mfxmq-flip" onClick={() => setRev(!rev)}>Flip direction</button>
</>
);
}
<!-- MarqueeWall.vue — three testimonial rows, hover-paused, one flip button -->
<script setup lang="ts">
import { ref } from 'vue';
import '@nabuxai/ui-core/css';
const quotes = [
{ id: 1, initials: 'LK', name: 'Lena · Berlin', line: 'The dashboard loads before my coffee.' },
{ id: 2, initials: 'RO', name: 'Ravi · Singapore', line: 'Warehouse sync just works, every 15 minutes.' },
{ id: 3, initials: 'AM', name: 'Aoife · Dublin', line: 'Replay found the bug in one watch.' },
{ id: 4, initials: 'JT', name: 'Jonas · Toronto', line: 'Guardrails saved the Q3 budget.' },
{ id: 5, initials: 'MS', name: 'Mei · Osaka', line: 'Latency from here? Twenty-six ms.' },
{ id: 6, initials: 'CR', name: 'Cristina · Lisbon', line: 'Our whole team reads it daily now.' },
];
const rows = [
{ id: 'slow', dur: '38s', base: 'normal' },
{ id: 'fast', dur: '26s', base: 'reverse' },
{ id: 'mid', dur: '32s', base: 'normal' },
];
const rev = ref(false);
// the flip XORs each row’s base direction
const dir = (base: string) => (base === 'reverse') !== rev.value ? 'reverse' : 'normal';
const rowStyle = (row: { dur: string; base: string }) =>
({ '--mfxmq-dur': row.dur, animationDirection: dir(row.base) }) as Record<string, string>;
</script>
<template>
<div v-for="row in rows" :key="row.id" class="mfxmq-row" :style="rowStyle(row)">
<div class="mfxmq-track">
<div class="mfxmq-half">
<figure v-for="q in quotes" :key="q.id" class="mfxmq-card">
<span class="mfxmq-avatar">{{ q.initials }}</span>
<blockquote>{{ q.line }}</blockquote>
<figcaption>{{ q.name }}</figcaption>
</figure>
</div>
<div class="mfxmq-half" aria-hidden="true">
<figure v-for="q in quotes" :key="'b' + q.id" class="mfxmq-card">
<span class="mfxmq-avatar">{{ q.initials }}</span>
<blockquote>{{ q.line }}</blockquote>
<figcaption>{{ q.name }}</figcaption>
</figure>
</div>
</div>
</div>
<button type="button" class="mfxmq-flip" @click="rev = !rev">Flip direction</button>
</template>
<style scoped>
.mfxmq-row { overflow: clip; }
.mfxmq-track { display: flex; inline-size: max-content;
animation: mfxmq-run var(--mfxmq-dur) linear infinite; }
.mfxmq-half { display: flex; gap: 1rem; padding-inline-end: 1rem; }
.mfxmq-row:hover :deep(.mfxmq-track), .mfxmq-row:focus-within :deep(.mfxmq-track) { animation-play-state: paused; }
.mfxmq-card { display: grid; gap: .35rem; inline-size: 18rem; margin: 0; padding: 1rem;
border: 1px solid #d9dde4; border-radius: 1rem; background: #fff;
font: 400 .85rem/1.5 system-ui; }
.mfxmq-avatar { display: grid; place-items: center; inline-size: 2.25rem; aspect-ratio: 1;
border-radius: 50%; background: #4f46e5; color: #fff; font-weight: 700; }
.mfxmq-card :deep(figcaption) { color: #5c6270; font-size: .75rem; }
.mfxmq-flip { border: 1px solid #d9dde4; border-radius: 999px; padding: .6rem 1.2rem;
background: #fff; cursor: pointer; }
@keyframes mfxmq-run { to { translate: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .mfxmq-track { animation: none; } }
</style>
<!-- MarqueeWall.svelte — three testimonial rows, hover-paused, one flip button -->
<script lang="ts">
import '@nabuxai/ui-core/css';
const quotes = [
{ id: 1, initials: 'LK', name: 'Lena · Berlin', line: 'The dashboard loads before my coffee.' },
{ id: 2, initials: 'RO', name: 'Ravi · Singapore', line: 'Warehouse sync just works, every 15 minutes.' },
{ id: 3, initials: 'AM', name: 'Aoife · Dublin', line: 'Replay found the bug in one watch.' },
{ id: 4, initials: 'JT', name: 'Jonas · Toronto', line: 'Guardrails saved the Q3 budget.' },
{ id: 5, initials: 'MS', name: 'Mei · Osaka', line: 'Latency from here? Twenty-six ms.' },
{ id: 6, initials: 'CR', name: 'Cristina · Lisbon', line: 'Our whole team reads it daily now.' },
];
const rows = [
{ id: 'slow', dur: '38s', base: 'normal' },
{ id: 'fast', dur: '26s', base: 'reverse' },
{ id: 'mid', dur: '32s', base: 'normal' },
];
let rev = $state(false);
// the flip XORs each row’s base direction
const dir = (base: string) => ((base === 'reverse') !== rev ? 'reverse' : 'normal');
</script>
{#each rows as row (row.id)}
<div class="mfxmq-row" style={`--mfxmq-dur: ${row.dur}; animation-direction: ${dir(row.base)};`}>
<div class="mfxmq-track">
<div class="mfxmq-half">
{#each quotes as q (q.id)}
<figure class="mfxmq-card">
<span class="mfxmq-avatar">{q.initials}</span>
<blockquote>{q.line}</blockquote>
<figcaption>{q.name}</figcaption>
</figure>
{/each}
</div>
<div class="mfxmq-half" aria-hidden="true">
{#each quotes as q ('b' + q.id)}
<figure class="mfxmq-card">
<span class="mfxmq-avatar">{q.initials}</span>
<blockquote>{q.line}</blockquote>
<figcaption>{q.name}</figcaption>
</figure>
{/each}
</div>
</div>
</div>
{/each}
<button type="button" class="mfxmq-flip" onclick={() => (rev = !rev)}>Flip direction</button>
<style>
.mfxmq-row { overflow: clip; }
.mfxmq-track { display: flex; inline-size: max-content;
animation: mfxmq-run var(--mfxmq-dur) linear infinite; }
.mfxmq-half { display: flex; gap: 1rem; padding-inline-end: 1rem; }
.mfxmq-row:hover .mfxmq-track, .mfxmq-row:focus-within .mfxmq-track { animation-play-state: paused; }
.mfxmq-card { display: grid; gap: .35rem; inline-size: 18rem; margin: 0; padding: 1rem;
border: 1px solid #d9dde4; border-radius: 1rem; background: #fff;
font: 400 .85rem/1.5 system-ui; }
.mfxmq-avatar { display: grid; place-items: center; inline-size: 2.25rem; aspect-ratio: 1;
border-radius: 50%; background: #4f46e5; color: #fff; font-weight: 700; }
.mfxmq-card figcaption { color: #5c6270; font-size: .75rem; }
.mfxmq-flip { border: 1px solid #d9dde4; border-radius: 999px; padding: .6rem 1.2rem;
background: #fff; cursor: pointer; }
@keyframes mfxmq-run { to { translate: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .mfxmq-track { animation: none; } }
</style>