HomeHero eject-only
Warning
This is an eject-only component, designed specifically for wrap/eject, and is not recommended for direct use in MDX files
This component is part of the Home Page. HomeHero renders the hero section on the home page.
Usage
Configure hero in the frontmatter of your mdx file:
index.mdx
The component will automatically read the hero configuration from frontmatter.
Custom slots
Use beforeHeroActions and afterHeroActions props to insert custom content before and after the action buttons:
index.mdx
Props
beforeHeroActions
- Type:
React.ReactNode
Custom content to insert before the Hero buttons.
afterHeroActions
- Type:
React.ReactNode
Custom content to insert after the Hero buttons.
Hero configuration
Here is the type definition for the hero field in frontmatter:
image.srcsupports configuring different images for dark/light modesimage.srcsetandimage.sizesare for responsive images, see MDN srcset documentationname,text, andtaglineall support HTML strings