Communitygithub.com

상호작용 디자인

마이크로인터랙션, 모션 디자인, 전환, 사용자 피드백 패턴을 설계하고 구현합니다. UI 상호작용에 세련미를 더하거나, 로딩 상태를 구현하거나, 즐거운 사용자 경험을 만들 때 사용하세요.

상호작용 디자인란 무엇인가요?

이 스킬은 사용자 인터페이스에 생동감과 직관성을 부여하는 상호작용 디자인 원칙과 구현 패턴을 제공합니다. 마이크로인터랙션, 페이지 전환, 로딩 상태, 제스처 기반 상호작용 등 다양한 UX 향상 요소를 Framer Motion, CSS 애니메이션, 그리고 접근성을 고려한 기법으로 구현하는 방법을 다룹니다. 특히 `prefers-reduced-motion`을 존중하며 성능 최적화(transform/opacity 사용)를 강조하여, 모든 사용자에게 부드럽고 포용적인 경험을 제공하는 것을 목표로 합니다. React, Framer Motion, CSS를 지원하며, 다양한 프레임워크에서 활용 가능한 범용적인 패턴을 제시합니다.

지원 대상~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/ulasalyesil/personal-website-v2/tree/HEAD/.agent/skills/interaction-design

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

상호작용 디자인은(는) 무엇을 하나요?

모션, 피드백, 세심한 상태 전환을 통해 사용성을 높이고 사용자에게 즐거움을 주는 직관적인 상호작용을 만듭니다.

이 스킬을 사용해야 할 때

  • 사용자 피드백을 향상시키는 마이크로인터랙션 추가
  • 부드러운 페이지 및 컴포넌트 전환 구현
  • 로딩 상태 및 스켈레톤 화면 설계
  • 제스처 기반 상호작용 생성
  • 알림 및 토스트 시스템 구축
  • 드래그 앤 드롭 인터페이스 구현
  • 스크롤 트리거 애니메이션 추가
  • 호버 및 포커스 상태 설계

핵심 원칙

1. 목적 있는 모션

모션은 장식이 아닌 소통을 위한 것입니다:

  • 피드백: 사용자 작업이 발생했음을 알림
  • 방향 안내: 요소가 어디서 왔는지/어디로 가는지 보여줌
  • 주의 집중: 중요한 변경 사항에 주목 유도
  • 연속성: 전환 중에도 맥락 유지

2. 타이밍 가이드라인

지속 시간사용 사례
100-150ms미세 피드백 (호버, 클릭)
200-300ms작은 전환 (토글, 드롭다운)
300-500ms중간 전환 (모달, 페이지 변경)
500ms 이상복잡한 연출 애니메이션

3. 이징 함수

/* 일반적인 이징 */
--ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* 감속 - 들어가기 */
--ease-in: cubic-bezier(0.55, 0, 1, 0.45); /* 가속 - 나가기 */
--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* 둘 다 - 이동 */
--spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* 오버슈트 - 경쾌함 */

빠른 시작: 버튼 마이크로인터랙션

import { motion } from "framer-motion";

export function InteractiveButton({ children, onClick }) {
  return (
    <motion.button
      onClick={onClick}
      whileHover={{ scale: 1.02 }}
      whileTap={{ scale: 0.98 }}
      transition={{ type: "spring", stiffness: 400, damping: 17 }}
      className="px-4 py-2 bg-blue-600 text-white rounded-lg"
    >
      {children}
    </motion.button>
  );
}

상호작용 패턴

1. 로딩 상태

스켈레톤 화면: 로딩 중에도 레이아웃 유지

function CardSkeleton() {
  return (
    <div className="animate-pulse">
      <div className="h-48 bg-gray-200 rounded-lg" />
      <div className="mt-4 h-4 bg-gray-200 rounded w-3/4" />
      <div className="mt-2 h-4 bg-gray-200 rounded w-1/2" />
    </div>
  );
}

진행률 표시기: 결정적 진행률 표시

function ProgressBar({ progress }: { progress: number }) {
  return (
    <div className="h-2 bg-gray-200 rounded-full overflow-hidden">
      <motion.div
        className="h-full bg-blue-600"
        initial={{ width: 0 }}
        animate={{ width: `${progress}%` }}
        transition={{ ease: "easeOut" }}
      />
    </div>
  );
}

2. 상태 전환

부드러운 전환을 포함한 토글:

function Toggle({ checked, onChange }) {
  return (
    <button
      role="switch"
      aria-checked={checked}
      onClick={() => onChange(!checked)}
      className={`
        relative w-12 h-6 rounded-full transition-colors duration-200
        ${checked ? "bg-blue-600" : "bg-gray-300"}
      `}
    >
      <motion.span
        className="absolute top-1 left-1 w-4 h-4 bg-white rounded-full shadow"
        animate={{ x: checked ? 24 : 0 }}
        transition={{ type: "spring", stiffness: 500, damping: 30 }}
      />
    </button>
  );
}

3. 페이지 전환

Framer Motion 레이아웃 애니메이션:

import { AnimatePresence, motion } from "framer-motion";

function PageTransition({ children, key }) {
  return (
    <AnimatePresence mode="wait">
      <motion.div
        key={key}
        initial={{ opacity: 0, y: 20 }}
        animate={{ opacity: 1, y: 0 }}
        exit={{ opacity: 0, y: -20 }}
        transition={{ duration: 0.3 }}
      >
        {children}
      </motion.div>
    </AnimatePresence>
  );
}

4. 피드백 패턴

클릭 시 물결 효과:

function RippleButton({ children, onClick }) {
  const [ripples, setRipples] = useState([]);

  const handleClick = (e) => {
    const rect = e.currentTarget.getBoundingClientRect();
    const ripple = {
      x: e.clientX - rect.left,
      y: e.clientY - rect.top,
      id: Date.now(),
    };
    setRipples((prev) => [...prev, ripple]);
    setTimeout(() => {
      setRipples((prev) => prev.filter((r) => r.id !== ripple.id));
    }, 600);
    onClick?.(e);
  };

  return (
    <button onClick={handleClick} className="relative overflow-hidden">
      {children}
      {ripples.map((ripple) => (
        <span
          key={ripple.id}
          className="absolute bg-white/30 rounded-full animate-ripple"
          style={{ left: ripple.x, top: ripple.y }}
        />
      ))}
    </button>
  );
}

5. 제스처 상호작용

밀어서 닫기:

function SwipeCard({ children, onDismiss }) {
  return (
    <motion.div
      drag="x"
      dragConstraints={{ left: 0, right: 0 }}
      onDragEnd={(_, info) => {
        if (Math.abs(info.offset.x) > 100) {
          onDismiss();
        }
      }}
      className="cursor-grab active:cursor-grabbing"
    >
      {children}
    </motion.div>
  );
}

CSS 애니메이션 패턴

키프레임 애니메이션

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out;
}
.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}
.animate-spin {
  animation: spin 1s linear infinite;
}

CSS 전환

.card {
  transition:
    transform 0.2s ease-out,
    box-shadow 0.2s ease-out;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

접근성 고려 사항

/* 사용자 모션 선호도 준수 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
function AnimatedComponent() {
  const prefersReducedMotion = window.matchMedia(
    "(prefers-reduced-motion: reduce)",
  ).matches;

  return (
    <motion.div
      animate={{ opacity: 1 }}
      transition={{ duration: prefersReducedMotion ? 0 : 0.3 }}
    />
  );
}

모범 사례

  1. 성능 우선: 부드러운 60fps를 위해 transform과 opacity 사용
  2. 모션 감소 지원: 항상 prefers-reduced-motion을 존중
  3. 일관된 타이밍: 앱 전체에서 타이밍 스케일 사용
  4. 자연스러운 물리: 선형보다 스프링 애니메이션 선호
  5. 중단 가능: 사용자가 긴 애니메이션을 취소할 수 있도록 함
  6. 점진적 향상: JS 애니메이션 없이도 작동하도록 구현
  7. 기기에서 테스트: 성능이 크게 달라질 수 있음

일반적인 문제

  • 끊김 애니메이션: width, height, top, left 애니메이션 지양
  • 과도한 애니메이션: 너무 많은 모션은 피로 유발
  • 상호작용 차단: 애니메이션 중 사용자 입력을 절대 막지 않음
  • 메모리 누수: 언마운트 시 애니메이션 리스너 정리
  • 콘텐츠 섬광: 최적화를 위해 will-change는 제한적으로 사용

리소스

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ulasalyesil/personal-website-v2

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

ulasalyesil/personal-website-v2

Conduct design interviews, generate five distinct UI variations in a temporary design lab, collect feedback, and produce implementation plans. Use when the user wants to explore UI design options, redesign existing components, or create new UI with multiple approaches to compare.

ulasalyesil/personal-website-v2

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

ulasalyesil/personal-website-v2

This skill is for interface design — dashboards, admin panels, apps, tools, and interactive products. NOT for marketing design (landing pages, marketing sites, campaigns).

ulasalyesil/personal-website-v2

Best practices and example-driven guidance for building SwiftUI views and components. Use when creating or refactoring SwiftUI UI, designing tab architecture with TabView, composing screens, or needing component-specific patterns and examples.

ulasalyesil/personal-website-v2

UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 9 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient. Integrations: shadcn/ui MCP for component search and examples.

ulasalyesil/personal-website-v2

Conduct WCAG 2.2 accessibility audits with automated testing, manual verification, and remediation guidance. Use when auditing websites for accessibility, fixing WCAG violations, or implementing accessible design patterns.

ulasalyesil/personal-website-v2

Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

ulasalyesil/personal-website-v2

Enforces an opinionated UI baseline to prevent AI-generated interface slop.

ulasalyesil/personal-website-v2

Build modern, composable, and accessible React UI components following the components.build specification. Use when creating, reviewing, or refactoring component libraries, design systems, or any reusable UI components. Triggers on tasks involving component APIs, composition patterns, accessibility, styling systems, or TypeScript props.

ulasalyesil/personal-website-v2

Ship correct, complete metadata.

ulasalyesil/personal-website-v2

Survey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on source code — never implements, fixes, or refactors anything itself. Use when asked to audit a codebase, find improvement opportunities (bugs, security, performance, test coverage, tech debt, migrations, DX), suggest features or where to take the project next (roadmap, product direction), or generate handoff plans for another agent to implement.

ulasalyesil/personal-website-v2

Defines the product's objects, relationships, states, and vocabulary independently of any interface — the most load-bearing layer

ulasalyesil/personal-website-v2

Maps domain concepts, terminology conflicts, and bounded contexts — produces a noun harvest for the conceptual model layer

ulasalyesil/personal-website-v2

Maps interaction structure and flow — produces breadboard notation with edge cases, failure paths, and open decisions

ulasalyesil/personal-website-v2

Framework orientation for Layers of Product Design — load this first; provides the context all other skills depend on

ulasalyesil/personal-website-v2

User research planning and synthesis at the observed behaviour layer — produces candidate job stories with confidence ratings

ulasalyesil/personal-website-v2

Diagnostic audit across all seven layers — identifies the bottleneck layer and recommends where to focus

ulasalyesil/personal-website-v2

Connects user opportunities to business outcomes and solution bets — produces a strategy tree and prioritised experiments

ulasalyesil/personal-website-v2

Audits existing surface against lower-layer decisions and produces a surface decision inventory — vocabulary, object consistency, completeness, feedback, hierarchy, accessibility

관련 스킬