01Flowing gradient text
A gradient is clipped to the text via background-clip:text, and animating background-position across an oversized background-size makes the color appear to keep flowing through the letters.
Best forLanding hero headlines, promo banner copy
background-clip:textbackground-position2s

<main class="stage">
<h1 class="flow">Summer Sale Starts</h1>
</main>@use "../../../../site/static/demo-tokens" as *;
$duration: $dur-loop; // 흐름 한 바퀴가 도는 시간
$easing: linear; // 속도 변화 없이 일정하게 흘러야 끊김이 없다
$color: $subject-blue; // 그러데이션의 기준 색
@include stage($stage-ink);
.flow {
margin: 0;
font-weight: 800; font-size: clamp(28px, 8.6vw, 46px); line-height: 1.2; font-family: inherit;
text-align: center;
background: linear-gradient(90deg, $color, $subject-cream, $color, $subject-cream, $color);
background-size: 300% 100%;
-webkit-background-clip: text; // Chrome·Edge 119 이하, Safari 15.4 이하는 접두사가 있어야 한다
background-clip: text;
color: transparent;
-webkit-text-fill-color: transparent;
animation: flow $duration $easing infinite;
}
@keyframes flow {
0% { background-position: 0% 50%; }
100% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
.flow { animation: none; background-position: 40% 50%; }
}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);
}
.flow {
margin: 0;
font-weight: 800;
font-size: clamp(28px, 8.6vw, 46px);
line-height: 1.2;
font-family: inherit;
text-align: center;
background: linear-gradient(90deg, #2f6df6, #fff7e6, #2f6df6, #fff7e6, #2f6df6);
background-size: 300% 100%;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
-webkit-text-fill-color: transparent;
animation: flow 2s linear infinite;
}
@keyframes flow {
0% {
background-position: 0% 50%;
}
100% {
background-position: 100% 50%;
}
}
@media (prefers-reduced-motion: reduce) {
.flow {
animation: none;
background-position: 40% 50%;
}
}import type { CSSProperties } from "react";
import styles from "./GradientTextFlow.module.scss";
export type GradientTextFlowProps = {
text: string;
/** 흐름 한 바퀴가 도는 시간 (기본 2000ms) */
duration?: number;
easing?: string;
/** 그러데이션 기준 색 */
color?: string;
};
type Vars = CSSProperties & { "--duration"?: string; "--easing"?: string; "--color"?: string };
export default function GradientTextFlow({
text,
duration = 2000,
easing = "linear",
color = "#2f6df6",
}: GradientTextFlowProps) {
const vars: Vars = { "--duration": `${duration}ms`, "--easing": easing, "--color": color };
return <h1 className={styles.flow} style={vars}>{text}</h1>;
}01 Flowing gradient text — Measured area 3.461% · moving frames 23/23Original by GODRICH · SCSS and React ship in the zip · 9 CSS Text Shine Animation Effects — Copy-Paste
The post this demo lives in
9 CSS Text Shine Animation Effects — Copy-PasteEach of these nine css text shine animation effects clips a moving gradient, a glow, or a spinning hue onto plain letter See all demos in this post


