The Hero section is the first thing visitors see. Each theme has its own unique hero design with custom animations, backgrounds, and layout.
Theme Variants
| Theme | Component | Design |
|---|---|---|
| Liquid | HeroLiquid.astro | Animated SVG liquid blobs, gradient text |
| Glass | HeroGlass.astro | Frosted card hero with blur backgrounds |
| Neo | HeroNeo.astro | Bold typography, high contrast |
| Luxury | HeroLuxury.astro | Gold accents, premium layout |
| Minimal | HeroMinimal.astro | Clean, centered, distraction-free |
| Aurora | HeroAurora.astro | Gradient mesh, geometric elements |
All variants are located at src/components/sections/hero/.
How It Works
Each Hero variant is a self-contained Astro component that:
- Imports and initializes
useTranslations()for the current locale. - Renders its own unique HTML structure with theme-specific CSS.
- Loads translation keys like
hero.title,hero.subtitle,hero.cta, andhero.liveBadgefromsrc/locales/{lang}/hero.json.
---import { useTranslations } from '../../../utils/i18n';import { getLocaleFromUrl } from '../../../utils/locale-utils';
const locale = getLocaleFromUrl(Astro.url);const t = useTranslations(locale);---
<section> <h1>{t('hero.title')}</h1> <p>{t('hero.subtitle')}</p> <a href="#explore">{t('hero.cta')}</a></section>ℹ️
No Props
Hero components take no external props. To change the headline, subtitle, or CTA text, edit src/locales/en/hero.json (or the appropriate locale file).
Customizing a Hero
To customize a specific theme’s hero:
- Open
src/components/sections/hero/Hero{Theme}.astro. - Modify the HTML structure, classes, or animations as needed.
- For CSS changes, edit
src/styles/components/hero/Hero{Theme}.css. - For text changes, edit
src/locales/{lang}/hero.json.