A sleek, high-performance portfolio website showcasing projects with smooth animations, magnetic interactions, and modern web technologies.
- Features
- Tech Stack
- Installation
- Usage
- Project Structure
- Documentation
- Screenshots & Demo
- Contributing
- License
- Author
- Magnetic Cursor System β Custom canvas cursor with physics-based dot & ring that responds to hover states
- Smooth Scroll Animation β Integrated Lenis scroll with GSAP ScrollTrigger for seamless parallax and reveal effects
- Dark/Light Theme Toggle β Persistent theme preference with CSS custom properties
- Responsive Design β Mobile-first approach with breakpoints for tablets and desktops
- Performance Optimized β Lazy loading, preloaded assets, optimized RAF synchronization
- Semantic HTML β Clean, accessible markup following best practices
- No Build Tools Required β Pure vanilla HTML, CSS, and ES Modules β just serve and run
- Interactive Project Showcase β Drag-to-scroll cards with smooth interactions
- Preloader Animation β Custom animated preloader with progress indication
| Category | Technology |
|---|---|
| Language | Vanilla JavaScript (ES Modules) |
| Markup | HTML5 (Semantic) |
| Styling | CSS3 (Custom Properties, Grid, Flexbox) |
| Animation | GSAP 3.12 + ScrollTrigger |
| Scroll Library | Lenis 1.0 (smooth scroll) |
| Fonts | Google Fonts (Syne, Inter) |
| Build | None (pure vanilla) |
Key Libraries:
gsap@3.12β Industry-standard animation librarylenis@1.0β Performant smooth scrolling- No webpack, Vite, or build step required
- Git (for cloning)
- Node.js (optional, for local HTTP server) or Python 3 (built-in on most systems)
- Modern browser with ES Module support (Chrome, Firefox, Safari, Edge)
# Clone the repository
git clone https://github.com/yourusername/priyansh-portfolio.git
# Navigate to project directory
cd priyansh-portfolioNo npm install needed! The project uses vanilla JavaScript with ES Modules. However, you'll need an HTTP server to run the site locally (ES Modules don't work with file:// protocol).
1. Install the "Live Server" extension in VS Code
2. Right-click index.html
3. Select "Open with Live Server"
4. Browser opens to http://localhost:5500Benefits: Auto-reload on file changes, perfect for development.
# Python 3.x
python3 -m http.server 8080
# Then open: http://localhost:8080Benefits: Built-in to most systems, lightweight.
# Using npx (no installation needed)
npx serve .
# Or install globally
npm install -g serve
serve .Benefits: Fast, production-ready static server.
# Clone and run (Python example)
git clone https://github.com/yourusername/priyansh-portfolio.git
cd priyansh-portfolio
python3 -m http.server 8080
# Visit: http://localhost:8080Edit these files to personalize:
index.htmlβ Update meta tags, content, linkscss/components.cssβ Modify styles for hero, cards, sectionsjs/ui.jsβ Adjust theme toggle, email copy functionalityjs/cursor.jsβ Tune cursor sensitivity and magnetic strength
priyansh-portfolio/
βββ index.html β Entry point β semantic HTML markup
β
βββ css/
β βββ base.css β Design tokens (CSS vars) Β· Reset Β· Keyframes
β βββ cursor.css β Magnetic cursor system (dot + ring + states)
β βββ components.css β All UI components (Nav Β· Hero Β· Cards Β· About)
β βββ LogoLoop.css β Logo animation stylesheet
β βββ responsive.css β Mobile / tablet breakpoints
β
βββ js/
β βββ main.js β Entry point Β· boots all modules
β βββ cursor.js β Magnetic cursor: lerp loop Β· hover states
β βββ scroll.js β Lenis + GSAP sync Β· nav state Β· anchor scroll
β βββ animations.js β Preloader Β· Hero Β· ScrollTrigger reveals
β βββ ui.js β Theme toggle Β· Email copy Β· Interactions
β βββ clickspark.js β Particle effects on interaction
β βββ LogoLoop.js β Logo animation logic
β βββ more-work.js β Additional project showcase logic
β
βββ images/ β Project screenshots and assets
β βββ quest-case.webp
β βββ referral-case.webp
β βββ cool\ priyansh\ favicon.png
β
βββ song-coverImages/ β Preloaded cover art for interactions
β βββ cover-1\ ajab\ prem.jpg
β βββ cover-2\ rakhlo\ chupake.png
β βββ cover-3\ 2states.jpg
β
βββ README.md β This file
βββ LICENSE β MIT License
The portfolio features a magnetic dot + ring cursor system that replaces the default browser cursor:
| Element | Behavior |
|---|---|
.cursor-dot |
Snaps instantly to mouse position (precision click indicator) |
.cursor-ring |
Lerps behind with easing factor β creates floating effect |
[data-magnetic] |
Elements pull toward cursor using GSAP spring animation |
.pcard / .sc-card |
Ring expands to 80px on hover (cursor-card state) |
a[href^="mailto"] |
Ring turns accent color on email links |
| Buttons / Links | Ring expands, dot hides on interaction |
<!-- Add data-magnetic attribute to any element -->
<button data-magnetic>Click me</button>
<a href="#section" data-magnetic>Scroll to Section</a>Edit CURSOR_CONFIG in js/cursor.js:
const CURSOR_CONFIG = {
ringLerp: 0.10, // Lower = more lag/float (0-1)
magneticStrength: 0.38, // Magnetic pull intensity (0-1)
magneticRadius: 80, // Pixel radius for detection
};Critical Pattern: Smooth scroll library (Lenis) synced with animation library (GSAP):
// Feed scroll events to ScrollTrigger for accurate trigger points
lenis.on('scroll', ScrollTrigger.update);
// Run Lenis animation loop on GSAP's RAF
gsap.ticker.add((time) => lenis.raf(time * 1000));
// Prevent stutter after tab switch
gsap.ticker.lagSmoothing(0);Why This Matters: Without this sync, GSAP animations fire at wrong scroll positions, causing visual glitches.
Visit the live site: priyansh-portfolio.com (Replace with your actual URL)
Priyansh Soni β Full Stack Developer
Building practical, high-performance web applications with modern technologies.
- Portfolio: priyansh-portfolio.com
- GitHub: @priyansh
- LinkedIn: priyansh-soni
- Email: contact@priyansh.dev
Made with β€οΈ by Priyansh