05Vertical ticker
Applies the same 2x-duplication formula on the Y axis so headlines or prices scroll upward inside a fixed-height box.
Best forLive price widgets, scrolling news headlines
translateY(-50%)column 트랙고정 높이

<main class="stage">
<div class="ticker">
<div class="ticker__track">
<span class="ticker__row">AAPL <b>189.42</b> ▲1.2%</span>
<span class="ticker__row">GOOG <b>172.05</b> ▼0.4%</span>
<span class="ticker__row">MSFT <b>428.90</b> ▲0.8%</span>
<span class="ticker__row">NVDA <b>121.77</b> ▲2.1%</span>
<span class="ticker__row" aria-hidden="true">AAPL <b>189.42</b> ▲1.2%</span>
<span class="ticker__row" aria-hidden="true">GOOG <b>172.05</b> ▼0.4%</span>
<span class="ticker__row" aria-hidden="true">MSFT <b>428.90</b> ▲0.8%</span>
<span class="ticker__row" aria-hidden="true">NVDA <b>121.77</b> ▲2.1%</span>
</div>
</div>
</main>@use "../../../../site/static/demo-tokens" as *;
$duration: $dur-loop;
$easing: linear;
$color: $subject-blue;
@include stage($stage-ink);
.ticker {
width: min(220px, 76vw);
height: 108px;
overflow: hidden;
border-radius: $r-control;
background: rgba($subject-cream, .06);
padding: 0 14px;
}
.ticker__track {
display: flex;
flex-direction: column;
animation: ticker-scroll $duration $easing infinite;
}
.ticker__row {
flex-shrink: 0;
height: 27px;
display: flex;
align-items: center;
gap: 6px;
font-weight: 600; font-size: clamp(11px, 3.2vw, 13px); line-height: 1; font-family: inherit;
color: rgba($subject-cream, .78);
b { color: $subject-blue-light; font-weight: 800; } // 어두운 면 위 파란 글자 — AA 4.5
}
// 세로 축에도 같은 2벌 복제 공식을 그대로 적용 — translateX 대신 translateY 로 -50%
@keyframes ticker-scroll {
from { transform: translateY(0); }
to { transform: translateY(-50%); }
}
@media (prefers-reduced-motion: reduce) {
.ticker__track { animation: none; transform: translateY(0); }
}html, body {
margin: 0;
overflow: hidden;
}
.stage {
box-sizing: border-box;
min-height: 100vh;
display: grid;
place-items: center;
margin: 0;
background: #17141a;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
padding: clamp(8px, 4vw, 24px);
}
.ticker {
width: min(220px, 76vw);
height: 108px;
overflow: hidden;
border-radius: 12px;
background: rgba(255, 247, 230, 0.06);
padding: 0 14px;
}
.ticker__track {
display: flex;
flex-direction: column;
animation: ticker-scroll 2s linear infinite;
}
.ticker__row {
flex-shrink: 0;
height: 27px;
display: flex;
align-items: center;
gap: 6px;
font-weight: 600;
font-size: clamp(11px, 3.2vw, 13px);
line-height: 1;
font-family: inherit;
color: rgba(255, 247, 230, 0.78);
}
.ticker__row b {
color: #5b8cf8;
font-weight: 800;
}
@keyframes ticker-scroll {
from {
transform: translateY(0);
}
to {
transform: translateY(-50%);
}
}
@media (prefers-reduced-motion: reduce) {
.ticker__track {
animation: none;
transform: translateY(0);
}
}import type { CSSProperties } from "react";
import styles from "./VerticalTicker.module.scss";
export type TickerRow = { symbol: string; price: string; change: string; up: boolean };
export type VerticalTickerProps = {
rows?: TickerRow[];
duration?: number;
easing?: string;
color?: string;
};
type Vars = CSSProperties & { "--duration"?: string; "--easing"?: string; "--color"?: string };
const defaultRows: TickerRow[] = [
{ symbol: "AAPL", price: "189.42", change: "▲1.2%", up: true },
{ symbol: "GOOG", price: "172.05", change: "▼0.4%", up: false },
{ symbol: "MSFT", price: "428.90", change: "▲0.8%", up: true },
{ symbol: "NVDA", price: "121.77", change: "▲2.1%", up: true },
];
export default function VerticalTicker({
rows = defaultRows,
duration = 12000,
easing = "linear",
color = "#2f6df6",
}: VerticalTickerProps) {
const vars: Vars = { "--duration": `${duration}ms`, "--easing": easing, "--color": color };
const doubled = [...rows, ...rows];
return (
<div className={styles.ticker} style={vars}>
<div className={styles.track}>
{doubled.map((r, i) => (
<span key={r.symbol + i} className={styles.row} aria-hidden={i >= rows.length}>
{r.symbol} <b>{r.price}</b> {r.change}
</span>
))}
</div>
</div>
);
}05 Vertical ticker — Measured area 9.767% · moving frames 23/23Original by GODRICH · SCSS and React ship in the zip · 9 CSS Marquee Infinite Loop — No JS, Scroll-Driven
The post this demo lives in
9 CSS Marquee Infinite Loop — No JS, Scroll-DrivenA css marquee infinite loop is a row of duplicated content — logos, a price ticker, a headline — that slides on repeat u See all demos in this post


