To run the application
-
Generate API_KEY at https://pexels.com
-
Create
.env.local
file and add theVITE_PEXELS_API_KEY
environment variableVITE_PEXELS_API_KEY=<your-api-key>
-
Run the following commands
npm install
npm run build
npm run preview
- Based on predefined column width and window width determine the amount of columns
- Iteratively place masonry items in the shortest column up to that point
- Skip rendering an item that does not intersect with the viewport (including the pre-defined threshold).
Lighthouse results with production build in the local environment (w/o any extension enabled)
Find the report summary attached: Lighthouse_Report.pdf
Styling is kept minimal and is applied solely for layout purposes.
- Virtualized responsive masonry grid layout
- Photo preview with additional details (Photographer, Description)
- Search by keywords
- Load more photos