Customize Hero
Learn how to customize your Plainform homepage hero section including headline, description, and call-to-action buttons
Learn how to customize your Plainform homepage hero section including headline, description, and call-to-action buttons.
Goal
By the end of this recipe, you'll have customized your hero section to match your product's value proposition.
Prerequisites
- A working Plainform installation
- Basic understanding of JSON syntax
What You'll Customize
- Hero headline with animated underline
- Description text
- Primary and secondary CTA buttons
- Event banner (optional)
- Total customers display
Steps
Locate the Hero Content
All hero section content is stored in the locale file:
locales/en.jsonNavigate to homePage.heroSection in the JSON structure.
Update the Headline
The headline uses a single title with an animated underline effect:
{
"homePage": {
"heroSection": {
"title": "Build faster\nLaunch smarter"
}
}
}Example:
"title": "Find Your Next Customer\non Reddit in Minutes"Use \n for line breaks in the title. The Highlighter component automatically adds an animated underline effect.
Update the Description
The description supports multi-line text using \n for line breaks:
"description": "Describe what your product does, who it's for, and why it matters.\nKeep it clear and concise to help visitors understand\nyour unique value."Example:
"description": "Automatically discover relevant Reddit discussions\nwhere your product can help. Turn conversations\ninto qualified leads."Line breaks (\n) in the JSON will render as actual line breaks on desktop. On mobile, text wraps naturally.
Customize CTA Buttons
The hero has two call-to-action buttons:
"cta": {
"primary": {
"text": "Get Started",
"href": "/#buy"
},
"secondary": {
"text": "Read the docs",
"href": "/docs"
}
}Primary Button:
- Displays with your logo icon
- Uses brand colors
- Typically links to pricing or signup
Secondary Button:
- Uses secondary styling
- Displays a book icon
- Typically links to docs or demo
Example:
"cta": {
"primary": {
"text": "Start Free Trial",
"href": "/sign-up"
},
"secondary": {
"text": "Watch Demo",
"href": "/#demo"
}
}Update Customers Text
The TotalCustomers component displays social proof below the hero:
"customersText": "customers already using this"Example:
"customersText": "founders finding leads daily"The actual count is fetched from paid Stripe checkout sessions through
/api/stripe/customers. This text appears after the number.
Preview Your Changes
Start the development server:
npm run devVisit http://localhost:3000 to see your updated hero section.
Advanced Customization
Modify Highlighter Effect
The title uses the Highlighter component with an underline effect. To customize:
<h1 className="leading-14 whitespace-pre-line">
<Highlighter
action="underline" // Change to 'highlight', 'box', 'circle', etc.
color="#758cff" // Change color
strokeWidth={1.5} // Adjust thickness
>
{heroLocale?.title}
</Highlighter>
</h1>Available actions: highlight, underline, box, circle, strike-through, crossed-off, bracket
Modify Hero Component Layout
If you need to change the structure (not just content), edit the component:
export function Hero() {
const heroLocale = locale?.homePage?.heroSection;
return (
<Section className="max-md:gap-20 h-max mt-20 justify-center">
<div className="flex flex-col gap-14 items-center z-10">
{/* Your custom layout here */}
</div>
</Section>
);
}Change Hero Styling
The hero uses Tailwind classes. Common customizations:
// Adjust spacing
<div className="flex flex-col gap-14 items-center"> // Change gap-14
// Modify text alignment
<div className="text-center"> // Change to text-left or text-right
// Adjust top margin
<Section className="mt-20"> // Change mt-20Remove Event Banner
The <Event /> component displays optional event banners. To remove it:
// Remove or comment out this line:
<Event />Verification
After making changes, verify:
- ✅ Headline displays correctly on desktop and mobile
- ✅ Animated underline effect works
- ✅ Description line breaks work as expected
- ✅ Both CTA buttons link to correct destinations
- ✅ Button text is clear and action-oriented
- ✅ Customers text makes grammatical sense with the count
Common Issues
Line Breaks Not Working
Ensure you're using \n (not \\n) in the JSON:
// ❌ Wrong
"title": "Line one\\nLine two"
// ✅ Correct
"title": "Line one\nLine two"CTA Buttons Not Linking
Check that href values start with / for internal links:
// ❌ Wrong
"href": "docs"
// ✅ Correct
"href": "/docs"Highlighter Not Showing
The Highlighter component requires client-side rendering. Ensure it's imported correctly and the color is valid.
Next Steps
- Highlighter Component - Customize the underline effect
- Customize FAQ Items - Update frequently asked questions
- Add Testimonials - Add social proof
How is this guide ?
Last updated on