TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nicolasgrajaleshoyos/portafolio/llms.txt
Use this file to discover all available pages before exploring further.
Projects component fills the third section of the portfolio (id #projects) with a responsive two-column card grid showcasing Nicolas’s work. Each card is handled by the internal ProjectCard sub-component, which manages its own image-loading skeleton, staggered entrance animation, and hover overlay that reveals GitHub and live-demo icon links. The section background alternates to bg-slate-50 dark:bg-dark to visually separate it from the About section.
Props
Projects accepts no external props. The list of projects is a static array defined at module level inside Projects.tsx.
Project Interface
The shape of each project entry is defined in src/types.ts:
liveUrl and codeUrl are optional; the ProjectCard renders an icon button only when the corresponding field is present.
ProjectCard Sub-component
ProjectCard receives three props:
The project data object to render, including title, description, image, tags, and optional links.
Passed down from the parent
Projects component. When true, the card transitions from translate-y-8 opacity-0 to translate-y-0 opacity-100.The zero-based position of the card in the list. Used to calculate a staggered
transitionDelay so cards enter the viewport one after another.Staggered entrance
Each card’s delay is proportional to its index:Image skeleton / loading state
ProjectCard owns a loaded boolean state. While the image is downloading, an absolutely-positioned animate-pulse grey rectangle covers the image area. Once the <img> fires onLoad, loaded becomes true, which hides the skeleton and fades the image in:
Hover overlay
An absolute<div> with the gradient:
absolute bottom-0 left-0 p-6). The GitHub and live-demo icon buttons appear at the top-right only on hover:
Projects Data
The current four projects are:Behavior
Visibility via IntersectionObserver
The parent Projects component attaches an IntersectionObserver (threshold 0.1) to the section ref. When the section enters the viewport, isVisible is set to true and the observer disconnects. This boolean is forwarded to every ProjectCard as the isVisible prop, triggering the staggered entrance simultaneously for all visible cards.
Usage Example
Projects is mounted inside <main> in App.tsx, after <About />:
Customization
Adding a new project
Adding a new project
Append a new object to the
projects array in Projects.tsx. Supply a unique id, a title, a description, an image path (place the image in public/icons/), and an array of technology tags. liveUrl and codeUrl are both optional:Adding a live demo link
Adding a live demo link
Set the
liveUrl field on an existing project entry. The ExternalLinkIcon button will automatically appear in the card’s hover overlay:Changing the grid column count
Changing the grid column count
The grid is defined on the wrapping
<div> in Projects. The default is two columns on md and above. Adjust as needed:Adjusting the stagger timing
Adjusting the stagger timing
In
ProjectCard, change the multiplier for transitionDelay: