This handles custom page transitions and routing animations in WeChat's Skyline rendering engine. You get seven preset routes like bottom sheets and iOS-style modals, or build your own with routeBuilder for things like half-screen popups, scaling transitions, and card-to-detail expansions. The worklet directive requirement is non-negotiable for animation functions, and custom routes only work between consecutive Skyline pages, not WebView. Most useful when you need gesture-driven navigation or want that polished native app feel. The open-container component for card expansions is nice, though you'll spend time wiring up startUserGesture and didPop correctly if you go beyond the presets.

skills.sh installs
1K
GitHub stars
56
last updated
Aug 21, 2026

Install

$ npx -y skills add wechat-miniprogram/skyline-skills --skill skyline-route --agent claude-code

Installs into .claude/skills of the current project.

Files

Skyline 自定义路由与页面转场

适用场景

  • 实现自定义页面转场动画(半屏、缩放、渐显等)
  • 使用预设路由快速实现常见转场效果
  • 配置页面返回手势(横向/纵向/多方向)
  • 实现卡片展开到详情页的容器转场动画
  • 通过 Router API 管理自定义路由

核心概念

路由能力层级

层级能力适用场景
预设路由一行代码使用 7 种内置效果快速实现常见转场
自定义路由通过 routeBuilder 完全控制动画高度定制化转场
容器转场<open-container> 元素级过渡卡片展开到详情页

动画控制器

属性说明
primaryAnimation页面进入/退出动画进度(0→1 进入,1→0 退出)
secondaryAnimation下一页进入时当前页动画进度(与下一页 primaryAnimation 同步)
userGestureInProgress当前路由进度是否由手势控制
startUserGesture / stopUserGesture手势接管/释放路由控制
didPop确认返回上一页

文档索引

根据需求快速定位(路径相对于 references/):

我想要...查阅文档
了解自定义路由原理和接口custom-route/custom-route-guide.md
查看半屏/手势返回代码模式custom-route/route-patterns.md
快速使用预设路由preset-route/preset-route.md
配置页面返回手势pop-gesture/pop-gesture.md
实现卡片展开转场open-container/open-container.md
查看 Router APIapi/router-api.md
了解 navigateTo 路由参数api/navigate-to.md
监听路由事件api/route-events.md

强制规则

MUST(必须遵守)

Sponsors

Details

Repository
github.com/wechat-miniprogram/skyline-skills
Category
Backend & APIs
First seen
Jun 3, 2026

More from wechat-miniprogram/skyline-skills

All 7
1everyinc avatarce-polish-betaeveryinc/compound-engineering-plugin[BETA] Start the dev server, open the feature in a browser, and iterate on improvements together.1Kskills.sh installs
2felo-inc avatarfelo-slidesfelo-inc/felo-skillsGenerate PPT/slides from prompts, local images, PDFs, and other files with the Felo PPT Task API. Use when users ask to create, make, generate, or export presen1Kskills.sh installs
3adobe avatardispatcheradobe/skillsSingle entry point for all AEM 6.5 LTS Dispatcher skills. Covers config authoring, technical advisory, incident response, performance tuning, security hardening1Kskills.sh installs
4dodopayments avatardodo-best-practicesdodopayments/skillsGuide for initial Dodo Payments setup, including SDK installation, test and live environments, API keys, and the canonical checkout-to-webhook architecture.1Kskills.sh installs
5kostja94 avatarrendering-strategieskostja94/marketing-skillsWhen the user wants to choose or optimize rendering strategy for SEO. Also use when the user mentions "SSR," "SSG," "CSR," "ISR," "static rendering," "dynamic r1Kskills.sh installs
6orchestra-research avatarpineconeorchestra-research/ai-research-skillsManaged vector database for production AI applications. Fully managed, auto-scaling, with hybrid search (dense + sparse), metadata filtering, and namespaces. Lo1Kskills.sh installs