Project: Dimension-like Landing (single-file demo)
Tech stack
- Next.js (13+)
- TypeScript
- Tailwind CSS
- Framer Motion (animations)
- clsx (optional small utility for classNames)
This single file is a self-contained React component meant to serve as pages/index.tsx in a fresh Next.js + TypeScript + Tailwind project.
It includes:
- Hero section with animated gradient blobs and subtle parallax-like motion.
- Responsive layout for mobile, tablet, and desktop.
- Simple navbar, CTA buttons, feature cards, and footer.
- Framer Motion animations for entrance and looping background motion.
- Create a new Next.js + TypeScript project (or use your existing one):
npx create-next-app@latest my-landing --typescript
cd my-landing- Install dependencies:
npm install framer-motion clsx
# Tailwind (if not installed):
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p-
Configure Tailwind: in
tailwind.config.js, setcontentto include./pages/**/*.{js,ts,jsx,tsx}and./components/**/*.{js,ts,jsx,tsx}. -
Copy this file into
pages/index.tsx(replace existing index) or intoapp/page.tsxfor App Router (minor adjustments foruse client). -
Add Tailwind directives in
styles/globals.css:
@tailwind base;
@tailwind components;
@tailwind utilities;- Run dev server:
npm run dev
# open http://localhost:3000- The design relies on Tailwind for styling and Framer Motion for animation. Feel free to swap animations for custom CSS keyframes.
- Replace placeholder text, icons, and assets with your own content and SVGs.
- For production performance, reduce number of animated elements and enable
will-changesparingly.