A professional, visually stunning preloader built with Next.js, React, TypeScript, Framer Motion for animations, and Tailwind CSS for styling with SCSS modules for custom styling.
Visit this link: https://awesome-preloader.vercel.app/
- Visually stunning preloader animation with dynamic elements and multilingual greetings
- Smooth transitions between loading and content states with SVG path animations
- Responsive design that works on all device sizes
- Built with modern technologies: Next.js, React, TypeScript, Framer Motion, and Tailwind CSS with SCSS modules
- Follows Atomic Design Pattern for component organization
├── public/ # Static files
├── src/ # Source code
│ ├── components/ # React components following Atomic Design
│ │ ├── atoms/ # Basic building blocks
│ │ ├── molecules/ # Animation definitions and combinations of atoms
│ │ └── organisms/ # Complex UI components like Preloader
│ ├── custom-styles/ # SCSS modules for component-specific styling
│ ├── pages/ # Next.js pages
│ └── styles/ # Global styles
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── tailwind.config.js # Tailwind CSS configuration
└── postcss.config.js # PostCSS configuration
- Node.js (v14 or later)
- npm or yarn
- Clone the repository
- Install dependencies:
npm install
# or
yarn installRun the development server:
npm run dev
# or
yarn devOpen http://localhost:3000 in your browser to see the result.
Create a production build:
npm run build
# or
yarn buildThe preloader uses Framer Motion for smooth animations, SVG path morphing, and Tailwind CSS with SCSS modules for styling. The animation displays a sequence of multilingual greetings that transition one after another, followed by a smooth exit animation using SVG path morphing. The preloader automatically transitions to the main content when all greetings have been displayed.
The implementation follows the Atomic Design Pattern:
- Molecules: Animation definitions in
Animation.tsxthat define opacity and slide-up animations - Organisms: The main
Preloadercomponent that orchestrates the animation sequence - Custom Styles: SCSS modules for component-specific styling
- Pages: Next.js pages that are wrapped with the Preloader component
The Preloader is integrated at the application level in _app.tsx, which means it wraps around all pages automatically:
// In _app.tsx
import Preloader from '@/components/organisms/Preloader';
export default function App({ Component, pageProps }: AppProps) {
// ...
return (
<Preloader>
<Component {...pageProps} />
</Preloader>
);
}This ensures that the preloader animation is shown before any page content is displayed. The preloader will automatically transition to the page content after displaying all multilingual greetings.
You can customize the preloader by modifying:
- Colors and styling in the SCSS module at
src/custom-styles/preloader.module.scss - Animation parameters in the
Animation.tsxfile - Multilingual greetings in the
wordsarray in thePreloadercomponent - Animation timing and duration in the
Preloadercomponent - SVG path morphing parameters for the exit animation