Overview
Astro Portfolio v3 includes a collection of reusable components organized into different categories. This guide will help you understand and customize these components to match your needs.Component Organization
Components are organized in the following structure:Shared Components
These are the most commonly customized components that appear throughout the site.- SectionHeader
- ArticleCard
- ThemeSwitcher
A reusable section header component with title and subtitle.
Props
The main heading text
The description text below the heading
The color of the accent bar
Usage
Customization Example
Modifysrc/components/shared/SectionHeader.astro to change the layout:Navigation Components
Home Page Components
Components specific to the homepage are located insrc/components/home/.
Displays the main hero section text and call-to-actionFile:
src/components/home/HeroText.astroShows the hero image with animationsFile:
src/components/home/HeroImage.astroThe about section with your description and imageFile:
src/components/home/About.astroDisplays your work experience timelineFile:
src/components/home/WorkExperience.astroShowcases your projects in a grid layoutFile:
src/components/home/Projects.astroLists recent blog postsFile:
src/components/home/Blogs.astroCreating Custom Components
Follow these steps to create your own custom component:Component Best Practices
Keep components focused: Each component should have a single, well-defined purpose.
Use TypeScript interfaces: Always define prop types for better development experience.
Make components responsive: Use Tailwind’s responsive prefixes (sm:, md:, lg:) for mobile-first design.
Advanced Customizations
Adding Interactive Features
For components that need client-side interactivity, use Astro’s<script> tag:
Using Framework Components
Astro supports React, Vue, Svelte, and other frameworks. To use a React component:Component Examples Repository
Check out the existing components in the source code for more examples:- Glow effect:
ArticleCard.astro:95-146 - Theme detection:
ThemeSwitcher.astro:46-82 - Modal implementation:
ShareModal.astro - Form handling:
NewsletterForm.astro