Overview
TheLoader component is a full-screen loading indicator featuring a 3x3 grid of cells with a cascading ripple animation. Each cell animates with a unique delay and color from the green-cyan spectrum, creating a smooth, eye-catching loading experience.
Visual Design
The loader displays 9 cells arranged in a 3x3 grid. Each cell:- Animates from transparent to its assigned color and back
- Uses staggered delays (0-400ms) to create a wave effect
- Features vibrant colors ranging from Spotify green (#1db954) to cyan (#60efff)
- Has rounded corners (4px border-radius)
Source Location
/workspace/source/src/app/components/ui/Loader.tsx
Props
This component accepts no props. It’s a self-contained loader with fixed styling.Styling Approach
This component uses styled-components for CSS-in-JS styling, unlike other UI components in the codebase that use Tailwind CSS.
CSS Variables
The loader uses CSS custom properties for configuration:Size of each individual cell in the grid
Spacing between cells
Number of cells per row/column
Color assigned to each cell via
:nth-child() selectorsAnimation Details
The ripple animation runs continuously with these characteristics:- Duration: 1.5 seconds
- Easing: ease
- Repeat: infinite
- Keyframes: 0% → 30% → 60% → 100% (transparent → color → transparent → transparent)
Animation Delays
Cells use class-based delay modifiers:Usage Example
From/workspace/source/src/app/page.tsx:5,45-46,49:
Color Palette
The loader uses 9 distinct colors in the green-cyan spectrum:| Cell | Color Code | Visual |
|---|---|---|
| 1 | #1db954 | Spotify Green |
| 2 | #0cfd95 | Mint Green |
| 3 | #17fba2 | Light Green |
| 4 | #23f9b2 | Aqua Green |
| 5 | #30f7c3 | Turquoise |
| 6 | #3df5d4 | Light Turquoise |
| 7 | #45f4de | Cyan |
| 8 | #53f1f0 | Light Cyan |
| 9 | #60efff | Bright Cyan |
Layout
The loader is positioned as a fixed overlay:The z-index of 9999 ensures the loader appears above all other content during loading states.
Implementation Notes
- No external dependencies besides React and styled-components
- Self-contained animation logic using CSS keyframes
- Fixed positioning covers entire viewport
- Centered using flexbox alignment
- No accessibility attributes (consider adding
role="status"andaria-live="polite"for screen readers)