A modern, fully-featured Vue 3 + TypeScript landing page template with complete component architecture and extensibility.
- Vue 3 with Composition API &
<script setup>
- TypeScript for type safety
- Pinia for state management
- Vue Router for routing
- Vite for fast development and building
- Modular Architecture: Fully componentized with clear separation
- Base Components: Reusable UI components (Button, Input, Card)
- Layout Components: Header, Footer with responsive navigation
- Section Components: Hero, Features, Products, Team, Stats, Newsletter
- Form Handling: Built-in validation with Composables
- β Fully Responsive - Mobile-first design
- β TypeScript - Complete type safety
- β State Management - Pinia stores for content and app state
- β Form Validation - Real-time validation with custom composables
- β Smooth Animations - CSS transitions and keyframes
- β SEO Optimized - Meta tags, structured data
- β Performance - Code splitting, lazy loading
- β Accessibility - ARIA labels, keyboard navigation
- β Modern CSS - CSS Grid, Flexbox, custom properties
src/
βββ components/
β βββ base/ # Reusable UI components
β β βββ BaseButton.vue
β β βββ BaseInput.vue
β β βββ BaseCard.vue
β βββ forms/ # Form components
β β βββ NewsletterForm.vue
β βββ layout/ # Layout components
β β βββ AppHeader.vue
β β βββ AppFooter.vue
β βββ sections/ # Page sections
β βββ HeroSection.vue
β βββ FeaturesSection.vue
β βββ ProductsSection.vue
β βββ TeamSection.vue
β βββ StatsSection.vue
βββ composables/ # Vue composables
β βββ useFormValidation.ts
βββ stores/ # Pinia stores
β βββ app.ts
β βββ content.ts
βββ types/ # TypeScript types
β βββ index.ts
βββ views/ # Page views
β βββ HomeView.vue
βββ router/ # Vue Router
β βββ index.ts
βββ App.vue
βββ main.ts
- Node.js 16+
- npm or yarn
# Install dependencies
npm install
# Copy environment file
cp .env.example .env
# Start development server
npm run dev
npm run dev # Start dev server
npm run build # Build for production
npm run preview # Preview production build
npm run type-check # TypeScript type checking
npm run lint # Lint with ESLint
npm run format # Format with Prettier
All content is managed through Pinia stores:
stores/content.ts
- Page content, navigation, team datastores/app.ts
- App configuration, UI state
- CSS-in-Vue with scoped styles
- Custom CSS properties for theming
- Responsive design with mobile-first approach
- Create new components in appropriate folders
- Follow existing patterns for props/events
- Use TypeScript interfaces from
types/index.ts
- Add to content store if needed
Create .env
file from .env.example
:
VITE_APP_TITLE
- Application titleVITE_API_URL
- API endpointVITE_GA_ID
- Google Analytics ID
- Vite config:
vite.config.ts
- TypeScript:
tsconfig.json
- Path aliases:
@/*
maps tosrc/*
Breakpoints:
xs
: < 640pxsm
: 640px+md
: 768px+lg
: 1024px+xl
: 1280px+2xl
: 1536px+
npm run build
npm i -g vercel
vercel --prod
- Connect your repo to Netlify
- Build command:
npm run build
- Publish directory:
dist
- Code Splitting: Automatic route-based splitting
- Tree Shaking: Unused code elimination
- Asset Optimization: Images and fonts optimized
- Lazy Loading: Components loaded on demand
- Meta tags with dynamic content
- Structured data (JSON-LD)
- Semantic HTML
- Open Graph tags
- Twitter Card support
- Canonical URLs
Add testing framework:
# Vitest + Testing Library
npm i -D vitest @vue/test-utils jsdom
npm i -D @testing-library/vue @testing-library/jest-dom
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open Pull Request
MIT License - see LICENSE file for details
- Create an issue for bugs/features
- Star the repo if it helps you!
- Contribute back improvements
Built with β€οΈ using Vue 3 + TypeScript