09스르륵 매끄러운(ぬるっと)
`.o-nuru`는 마우스를 올리면 화살표 아이콘이 ease-out-expo에 가까운 cubic-bezier로 미끄러지듯 이동해, 다른 항목들의 탄성과 대비되는 매끈한 느낌을 줍니다.
쓰임자세히 보기 링크, 다음 단계 버튼, 내비게이션 화살표
translateXcubic-bezier(.16, 1, .3, 1)700ms

<main class="stage">
<a class="link o-nuru is-demo" href="#">
자세히 보기
<span class="link__arrow" aria-hidden="true">→</span>
</a>
<span class="tag">스르륵</span>
</main>@use "../../../../site/static/demo-tokens" as *;
// ── 변수 3개 ──────────────────────────────────────────
$duration: 700ms;
$easing: cubic-bezier(.16, 1, .3, 1); // ease-out-expo 근사 — 매끄럽게 감속한다
$color: $subject-blue;
// ── 데모 무대 ───────────────────────────────
@include stage($stage-ink);
.stage { position: relative; }
.link {
display: inline-flex;
align-items: center;
gap: $sp-2;
padding: $sp-3 $sp-2;
color: $subject-cream;
text-decoration: none;
font-weight: 700;
font-size: clamp(16px, 4.5vw, 19px);
line-height: 1;
font-family: inherit;
border-bottom: 2px solid rgba(255, 247, 230, .3);
}
.link__arrow {
display: inline-block;
color: $color;
font-size: 22px;
}
.tag {
position: absolute;
top: $sp-4;
right: $sp-4;
padding: $sp-1 $sp-3;
border-radius: $r-sm;
background: rgba(255, 255, 255, .12);
color: $subject-cream;
font-weight: 700;
font-size: 12px;
line-height: 1;
font-family: inherit;
letter-spacing: .04em;
}
// ── 실제 쓰임: 마우스를 올리면(또는 포커스) 화살표가 미끄러지듯 이동한다 ─────
.link.o-nuru:hover .link__arrow,
.link.o-nuru:focus-visible .link__arrow { animation: o-nuru $duration $easing 1; }
// ── 데모: 2초마다 스스로 미끄러진다 ─────
.link.o-nuru.is-demo .link__arrow { animation: o-nuru-loop $dur-loop $easing infinite; }
@keyframes o-nuru {
0% { transform: translateX(0) scale(1); }
100% { transform: translateX(28px) scale(1.15); }
}
@keyframes o-nuru-loop {
0%, 40% { transform: translateX(0) scale(1); }
78% { transform: translateX(28px) scale(1.15); }
100% { transform: translateX(0) scale(1); }
}
// ── 접근성 ──────────────────────────────────────────
@media (prefers-reduced-motion: reduce) {
.link.o-nuru:hover .link__arrow, .link.o-nuru:focus-visible .link__arrow,
.link.o-nuru.is-demo .link__arrow { animation: none; }
}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);
}
.stage {
position: relative;
}
.link {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 12px 8px;
color: #fff7e6;
text-decoration: none;
font-weight: 700;
font-size: clamp(16px, 4.5vw, 19px);
line-height: 1;
font-family: inherit;
border-bottom: 2px solid rgba(255, 247, 230, 0.3);
}
.link__arrow {
display: inline-block;
color: #2f6df6;
font-size: 22px;
}
.tag {
position: absolute;
top: 16px;
right: 16px;
padding: 4px 12px;
border-radius: 8px;
background: rgba(255, 255, 255, 0.12);
color: #fff7e6;
font-weight: 700;
font-size: 12px;
line-height: 1;
font-family: inherit;
letter-spacing: 0.04em;
}
.link.o-nuru:hover .link__arrow,
.link.o-nuru:focus-visible .link__arrow {
animation: o-nuru 700ms cubic-bezier(0.16, 1, 0.3, 1) 1;
}
.link.o-nuru.is-demo .link__arrow {
animation: o-nuru-loop 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}
@keyframes o-nuru {
0% {
transform: translateX(0) scale(1);
}
100% {
transform: translateX(28px) scale(1.15);
}
}
@keyframes o-nuru-loop {
0%, 40% {
transform: translateX(0) scale(1);
}
78% {
transform: translateX(28px) scale(1.15);
}
100% {
transform: translateX(0) scale(1);
}
}
@media (prefers-reduced-motion: reduce) {
.link.o-nuru:hover .link__arrow, .link.o-nuru:focus-visible .link__arrow,
.link.o-nuru.is-demo .link__arrow {
animation: none;
}
}import type { CSSProperties, ReactNode } from "react";
import styles from "./SmoothLink.module.scss";
export type SmoothLinkProps = {
children: ReactNode;
href?: string;
/** 미끄러지는 데 걸리는 시간 (기본 700ms) */
duration?: number;
/** CSS easing (기본 ease-out-expo 근사) */
easing?: string;
color?: string;
};
type Vars = CSSProperties & {
"--duration"?: string;
"--easing"?: string;
"--color"?: string;
};
export default function SmoothLink({
children,
href = "#",
duration = 700,
easing = "cubic-bezier(.16,1,.3,1)",
color = "#2f6df6",
}: SmoothLinkProps) {
const vars: Vars = {
"--duration": `${duration}ms`,
"--easing": easing,
"--color": color,
};
return (
<a className={styles.link} href={href} style={vars}>
{children}
<span className={styles.arrow} aria-hidden="true">
→
</span>
</a>
);
}09 스르륵 매끄러운(ぬるっと) — 측정 누적면적 0.172% · 움직인 프레임 13/23GODRICH 원작 · zip 에 SCSS·React 포함 · CSS 통통 튀는 애니메이션 9종 — 한 줄 복붙으로
이 데모가 속한 글
CSS 통통 튀는 애니메이션 9종 — 한 줄 복붙으로CSS 통통 튀는 애니메이션은 요소를 그냥 나타나게 하지 않고 뜨고, 튕기고, 떨고, 흔들리게 만들어 살아 있는 느낌을 주는 움직임입니다. 흔한 영어 이름 대신 둥실둥실·포용·푸루푸루 같은 의성어로 아홉 개를 골랐고 이 글의 데모 전부 보기


