本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)75k · #3077

view-transitions

できること

このスキルは、ブラウザーのView Transitions APIを使って、画面の状態の間になめらかなアニメーションを追加します。シングルページやマルチページのサイトを作る開発者向けです。

使う場面

  • ✓ページの切り替えが唐突で、利用者が今どこにいるか分からなくなるとき。
  • ✓画像を詳細の表示へなめらかに広げたいとき。
  • ✓サイトがブラウザーで今は標準的に扱えるアニメーションのライブラリを使っていないか確認するとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/view-transitions/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/view-transitions/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私のアプリのページの切り替えが唐突です。大きなアニメーションのライブラリを追加せずに、なめらかなトランジションを追加してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、ページの変更をブラウザーのトランジションの呼び出しで囲み、個別にアニメーションすべき要素に名前を付けます。ブラウザーは変化の前後のスナップショットを撮り、その間をアニメーションします。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Use the View Transitions API for smooth page and component transitions

Jarring instant page changes are one of the most noticeable perceived- performance problems in web applications. Smooth transitions help users maintain context during navigation — they understand where they came from and where they are going. Previously, achieving this required complex JavaScript animation libraries; the View Transitions API delivers it natively at a fraction of the code cost.

Quick Reference

  • Wrap DOM mutations in document.startViewTransition() for same-page transitions
  • Add view-transition-name to elements that should animate individually (not the whole page)
  • Use @starting-style and ::view-transition-* pseudo-elements to customise animations
  • Enable cross-document transitions in CSS with @view-transition { navigation: auto }

Check

Check whether the site uses the View Transitions API or a JavaScript animation library for page and component transitions.

Fix

Implement view transitions using document.startViewTransition() for SPA route changes or @view-transition for MPA cross-document navigation.

Explain

Explain how the View Transitions API captures before/after snapshots and animates between them, and how view-transition-name enables shared-element transitions.

Code Review

Review transition implementation for missing prefers-reduced-motion guards, duplicate view-transition-name values (must be unique per snapshot), and transitions that may cause layout thrash in the old/new state.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/css/view-transitions

よくある質問

JavaScriptのライブラリが必要ですか?

このスキルによると、View Transitions APIはブラウザーに組み込まれているため、アニメーションのライブラリが必要とするコードの多くを避けられます。

トランジションは動きを減らす設定を尊重すべきですか?

はい。このスキルは、prefers-reduced-motionのガードがないことを直すべき問題として挙げています。

view-transition-nameは何のためのものですか?

2つのページの間で共有される画像のように、一つの要素を独自にアニメーションできるようにするものです。

詳細

作者による元の説明

Use when adding page transition animations, image expand/contract effects, shared-element transitions, or improving navigation UX in a single-page or multi-page application.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#3077
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル