Logos Marquee Strip
An endless horizontal strip of wordmarks that loops seamlessly for social proof.
3 个框架初级
A looping row that pauses on hover and on keyboard focus so items stay clickable.
<!--
play-state:paused on hover AND focus-within: the pause has to be reachable by
keyboard too, so the items are links and tabbing into one stops the loop. That
is what lets a reader actually click a moving target.
-->
<style>
@keyframes marquee-pause-scroll {
to { transform: translateX(-50%); }
}
</style>
<section class="w-full overflow-hidden py-6" aria-label="Browse categories">
<div class="flex w-max animate-[marquee-pause-scroll_30s_linear_infinite] [animation-play-state:running] hover:[animation-play-state:paused] focus-within:[animation-play-state:paused] motion-reduce:w-full motion-reduce:animate-none">
<ul class="flex shrink-0 items-center gap-3 pr-3 motion-reduce:w-full motion-reduce:flex-wrap motion-reduce:justify-center motion-reduce:gap-y-3 motion-reduce:pr-0">
<li><a href="#" class="inline-flex whitespace-nowrap rounded-full border border-gray-200 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:border-gray-300 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 dark:hover:text-gray-100 dark:focus-visible:ring-blue-400">Design</a></li>
<li><a href="#" class="inline-flex whitespace-nowrap rounded-full border border-gray-200 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:border-gray-300 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 dark:hover:text-gray-100 dark:focus-visible:ring-blue-400">Engineering</a></li>
<li><a href="#" class="inline-flex whitespace-nowrap rounded-full border border-gray-200 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:border-gray-300 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 dark:hover:text-gray-100 dark:focus-visible:ring-blue-400">Product</a></li>
<li><a href="#" class="inline-flex whitespace-nowrap rounded-full border border-gray-200 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:border-gray-300 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 dark:hover:text-gray-100 dark:focus-visible:ring-blue-400">Marketing</a></li>
</ul>
<ul class="flex shrink-0 items-center gap-3 pr-3 motion-reduce:hidden" aria-hidden="true">
<li><a href="#" tabindex="-1" class="inline-flex whitespace-nowrap rounded-full border border-gray-200 bg-white px-4 py-2 text-sm font-medium text-gray-700 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300">Design</a></li>
<li><a href="#" tabindex="-1" class="inline-flex whitespace-nowrap rounded-full border border-gray-200 bg-white px-4 py-2 text-sm font-medium text-gray-700 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300">Engineering</a></li>
<li><a href="#" tabindex="-1" class="inline-flex whitespace-nowrap rounded-full border border-gray-200 bg-white px-4 py-2 text-sm font-medium text-gray-700 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300">Product</a></li>
<li><a href="#" tabindex="-1" class="inline-flex whitespace-nowrap rounded-full border border-gray-200 bg-white px-4 py-2 text-sm font-medium text-gray-700 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300">Marketing</a></li>
</ul>
</div>
</section>| Prop | 类型 | 默认值 | 说明 |
|---|---|---|---|
items | { label: string; href: string }[] | 6 sample links | 要渲染的项目数组。 |
durationSeconds | number | 30 | Duration seconds |
className | string | - | 合并到根元素上的额外类名。 |
The pause uses both `hover:` and `focus-within:[animation-play-state:paused]` so it is reachable by keyboard; the items are links for that reason. The clone's links get `tabIndex -1` to avoid duplicate tab stops.