ライブデモ Live Demo

処理完了を示すチェックマークのアニメーションです。

A checkmark animation indicating successful completion.

送信完了! Complete!

AI向け説明 AI Description

`S-009` は操作の完了を視覚的に伝えるためのSVGアニメーションです。`stroke-dasharray` と `stroke-dashoffset` を操作して、円とチェックマークを線画で描画します。

`S-009` is an SVG animation used to verify action completion. It animates the circle and checkmark strokes using `stroke-dasharray` and `stroke-dashoffset`.

調整可能パラメータ Adjustable Parameters

実装 Implementation

HTML + CSS

<svg class="success-anim" viewBox="0 0 52 52">
  <circle class="circle" cx="26" cy="26" r="25" />
  <path class="check" d="M14 27l7 7 16-16" />
</svg>

<style>
:root { --success-color: #22c55e; }
.circle { stroke-dasharray: 166; stroke-dashoffset: 166; animation: stroke 0.6s forwards; stroke: var(--success-color); fill: none; }
.check { stroke-dasharray: 48; stroke-dashoffset: 48; animation: stroke 0.3s 0.6s forwards; stroke: var(--success-color); fill: none; }
@keyframes stroke { 100% { stroke-dashoffset: 0; } }
</style>

React (JSX + CSS)

// react/S-009.jsx
import './S-009.css';

export default function SuccessCheck({ message = 'Success!' }) {
  return (
    <div className="success-wrapper">
      <svg className="success-anim" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
        <circle className="success-circle" cx="26" cy="26" r="25" />
        <path className="success-check" d="M14.1 27.2l7.1 7.2 16.7-16.8" />
      </svg>
      <div className="success-text">{message}</div>
    </div>
  );
}
/* react/S-009.css */
/* S-009: React styles */
.success-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.success-anim {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
}

.success-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke: #22c55e;
  fill: none;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-check {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-width: 3;
  stroke: #22c55e;
  fill: none;
  animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
  100% {
    stroke-dashoffset: 0;
  }
}

.success-text {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.4s ease 0.9s forwards;
  font-size: 24px;
  font-weight: 600;
  color: #1d2242;
}

@keyframes fadeUp {
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

AIへの指示テンプレート AI Prompt Template

以下のテンプレートをコピーしてAIアシスタントに貼り付けると、このパターンの実装を依頼できます。 Copy the template below and paste it into your AI assistant to request an implementation of this pattern.