This tutorial explains how to edit the HeroComponentFour component to suit your needs. You'll learn how to:
Update text content (heading, body, and buttons).
Modify button links and styles.
Replace or add image assets in the scrolling carousel.
Understand and adjust animation timing for smoother transitions.
Follow best practices for responsive and accessible design.
Project Resources
Tutorial
Step 1: Editing Text Content
Locate the main text elements in the component:
Heading
Edit: Replace the placeholder text with your headline.
Example Update:
Body Text
Edit: Replace the placeholder with a concise description or call to action.
Example Update:
Step 2: Updating Buttons
Locate the buttons within the Call to Action Buttons
section:
Desktop Buttons
Edit Button Text: Replace
"Join for free"
and"See our plans"
with your desired labels.Edit Links (
href
): Update/signup
and/pricing
to the appropriate URLs for your app.
Example Update:
Mobile Buttons
Follow the same steps to update text and links.
Step 3: Replacing or Adding Images
Carousel Image List
The scrolling images are defined in the imageList
array:
Replace
src
: Update the image paths with your own. If using local images, save them in thepublic
folder (e.g.,public/images/
).Update
alt
: Provide meaningful descriptions for each image for accessibility and SEO.
Example Update:
Adding More Images
Add additional objects to the array following the same structure:
Removing Images
Delete objects you no longer need from the array.
Step 4: Adjusting Animation Timing
The animations for the image carousel are controlled in the motion.div
elements:
Adjust Speed (
duration
): Lower values make the animation faster, while higher values slow it down.Easing: Modify the easing function (
ease
) to experiment with different animation styles (e.g.,easeIn
,easeOut
).
Example Update: