🚀 Modern Frontend Boilerplate for Animation-Rich Apps 🌟 开箱即用的交互动画开发模板 | Production-Ready Starter Kit
# 1. 克隆项目
git clone https://github.com/RyanHo97/vite-vue3-tailwind-gsap-starter
# 2. 安装依赖
pnpm install
# 3. 启动开发服务器
pnpm run dev
├── src
│ ├── assets # 静态资源
│ ├── components # 组件
│ ├── composables # Vue组合式函数
│ ├── styles # 全局样式
│ ├── utils # 工具函数
│ ├── views # 页面视图
│ ├── App.vue # 根组件
│ └── main.ts # 入口文件
├── index.html # 主HTML文件
└── vite.config.ts # Vite配置
<script setup lang="ts">
import { onMounted } from 'vue'
import gsap from 'gsap'
onMounted(() => {
gsap.from('.box', {
duration: 1,
x: -100,
opacity: 0,
ease: 'back.out(1.7)'
})
})
</script>
<template>
<div class="box w-20 h-20 bg-blue-500 rounded-lg"></div>
</template>
<template>
<div class="flex flex-col md:flex-row gap-4">
<div class="w-full md:w-1/2 bg-red-100 p-4">左侧内容</div>
<div class="w-full md:w-1/2 bg-blue-100 p-4">右侧内容</div>
</div>
</template>
欢迎提交PR或Issue!请确保:
MIT License
这是一个功能完整但仍在测试阶段的 starter 模板。alpha 版本意味着可能还会变化,建议非生产环境上使用。