Skip to main content

Component <MainHero />

Props

PropsTypeMeaningPossible values
titlestringAdd hero titlestring
titleTypestringSet hero title typeheading / banner
subtitlestringAdd hero subtitlestring
backgroundstringSet hero background color or gradientHEX coor
imagestringSet hero imageimage path
imagePositionstringChange hero image and text positionleft / right
imageSizestringChange hero image size. This setting also change font size, hero height and paddingsfull / auto
cardnodeAdd hero platform cadelement
handleGoBackfunctionAdd hero back button with provided action() => void



Position

Examples:

<MainHero
title="WHAT<span style='color: #fff'> LOREM IPSUM?</span>"
subtitle="Lorem Ipsum is simply dummy text of the printing and typesetting industry."
background="#f14f6d"
image="https://via.placeholder.com/950x630/ffffff/000000?text=Demo"
imagePosition="left"
/>

<MainHero
title="WHAT<span style='color: #fff'> LOREM IPSUM?</span>"
subtitle="Lorem Ipsum is simply dummy text of the printing and typesetting industry."
background="#f14f6d"
image="https://via.placeholder.com/950x630/ffffff/000000?text=Demo"
imagePosition="right"
/>



Image sizes

Examples:

<MainHero
title="<span style='color: #fff'>WHAT </span>LOREM IPSUM?"
subtitle="Lorem Ipsum is simply dummy text of the printing and typesetting industry."
background="#35a577"
image="https://via.placeholder.com/950x630/ffffff/000000?text=Demo"
imageSize="full"
/>

<MainHero
title="<span style='color: #fff'>WHAT </span>LOREM IPSUM?"
subtitle="Lorem Ipsum is simply dummy text of the printing and typesetting industry."
background="#35a577"
image="https://via.placeholder.com/950x630/ffffff/000000?text=Demo"
imageSize="auto"
/>



With card

Examples:

<MainHero
title="WHAT<span style='color: #fff'> LOREM IPSUM?</span>"
subtitle="Lorem Ipsum is simply dummy text of the printing and typesetting industry."
background="#ff9fc4"
image="https://via.placeholder.com/950x630/ffffff/000000?text=Demo"
card={<div>Card content</div>}
/>



With back button

Examples:

<MainHero
title="WHAT<span style='color: #fff'> LOREM IPSUM?</span>"
subtitle="Lorem Ipsum is simply dummy text of the printing and typesetting industry."
background="#bbd9e4"
image="https://via.placeholder.com/950x630/ffffff/000000?text=Demo"
handleGoBack={() => {}}
/>