theme-transition

Implement circular clip-path theme transitions with the View Transition API.

2|1|Updated Dec 10, 2025
One-click install
npx skills add https://github.com/inernoro/prd_agent --skill theme-transition
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: theme-transition
Source: https://github.com/inernoro/prd_agent/tree/main/.claude/skills/theme-transition
Command: npx skills add https://github.com/inernoro/prd_agent --skill theme-transition

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

为任意前端项目添加从按钮位置向外扩散的圆形 clip-path 主题切换动效,基于 View Transition API,自动降级到瞬时切换,提升用户界面的连贯性与沉浸感。

Core Features & Use Cases

  • Circular, clip-path based theme transition that starts from a button or control, expanding to cover the full viewport.
  • Falls back gracefully to instant theme switch on browsers without View Transition API support.
  • Works across React, Vanilla JS, and Tauri-based desktop apps, with guidance for CSS variables and JS coordination.

Quick Start

点击主题切换按钮以触发一个圆形过渡,从点击点向外扩散并无缝切换主题。

Frequently Asked Questions about theme-transition

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a circular theme transition using the View Transition API?

Yes, Vanilla JavaScript projects can implement circular theme transitions by calculating click coordinates and applying the startViewTransition method to execute the ripple effect with CSS variables.

What happens to theme transitions in browsers without View Transition API support?

Browsers without View Transition API support trigger graceful degradation, automatically falling back to an instant theme switch without breaking the user interface or causing visual errors.

Can I use the circular theme transition effect in React and Tauri desktop apps?

Yes, the circular theme transition works across React, Vanilla JS, and Tauri-based desktop apps, providing guidance for coordinating CSS variables and JavaScript to trigger the ripple effect.

How do you calculate coordinates for a ripple theme switch animation?

You calculate coordinates for a ripple theme switch by capturing the click event's X and Y positions, passing them to CSS variables, and using clip-path to expand the circular transition from that exact point.

Are there limitations when applying clip-path animations for theme switching?

The primary limitation is browser compatibility; without the View Transition API, the clip-path animation cannot render and the application must degrade gracefully into an instant theme switch.