A modern, configurable navigation component featuring liquid 3D mesh backgrounds, magnetic cursor interactions, and buttery smooth animations. Built with Svelte, Three.js, GSAP, and Tailwind CSS.
| Technology | Purpose |
|---|---|
| Svelte 4 | Reactive UI framework with minimal bundle size |
| Three.js | WebGL 3D graphics and custom shaders |
| GSAP 3 | Professional-grade animations |
| Tween.js | Smooth value interpolation |
| Lenis | Smooth scroll library |
| Tailwind CSS | Utility-first styling |
| Vite | Lightning-fast build tool |
# Clone the repository
git clone https://github.com/smart-developer1791/svelte-threejs-gsap-magnetic-navigation-tailwind
# Navigate to project directory
cd svelte-threejs-gsap-magnetic-navigation-tailwind
# Install dependencies
npm install
# Start development server
npm run dev
npm run build
npm run preview
Modify the navConfig object in App.svelte:
const navConfig = {
brand: {
name: 'YourBrand',
icon: 'ā'
},
links: [
{ id: 'home', label: 'Home', href: '#home' },
{ id: 'about', label: 'About', href: '#about' },
{ id: 'services', label: 'Services', href: '#services' },
{ id: 'contact', label: 'Contact', href: '#contact' }
],
cta: {
label: 'Get Started',
href: '#contact'
}
}
Configure sections via the sections array:
const sections = [
{
id: 'about',
title: 'Section Title',
subtitle: 'Section Subtitle',
content: 'Your content here...',
features: ['Feature 1', 'Feature 2', 'Feature 3'],
accent: 'plasma' // 'plasma' | 'aurora' | 'solar'
}
]
svelte-threejs-gsap-magnetic-navigation-tailwind/
āāā public/
ā āāā favicon.svg
āāā src/
ā āāā lib/
ā ā āāā components/
ā ā āāā Navigation.svelte # Main navigation component
ā ā āāā LiquidBackground.svelte # Three.js background
ā ā āāā MagneticCursor.svelte # Custom cursor
ā ā āāā HeroSection.svelte # Landing hero
ā ā āāā ContentSection.svelte # Reusable section
ā ā āāā Footer.svelte # Footer component
ā āāā App.svelte # Root component
ā āāā app.css # Global styles
ā āāā main.js # Entry point
āāā .gitignore
āāā index.html
āāā LICENSE
āāā netlify.toml
āāā package.json
āāā postcss.config.js
āāā README.md
āāā tailwind.config.js
āāā vite.config.js
netlify.toml# Build the project
npm run build
# The 'dist' folder contains your static files
# Upload to any static hosting provider
Modify tailwind.config.js:
colors: {
'void': '#0a0a0f', // Background
'nebula': '#1a1a2e', // Secondary background
'plasma': '#6366f1', // Primary accent
'aurora': '#22d3ee', // Secondary accent
'solar': '#f59e0b' // Tertiary accent
}
Customize the liquid mesh in LiquidBackground.svelte by modifying:
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
Pulled into orbit by cursor & code ⢠Forged with Svelte, Three.js & endless ā