PhoenixKit.Modules.Publishing.Components.Hero (phoenix_kit v1.7.33)

Copy Markdown View Source

Hero section component with multiple variants.

Variants:

  • split-image: Hero with content on left, image on right
  • centered: Centered content with optional background
  • minimal: Simple centered text-only hero

Example usage in .phk file:

<Hero variant="split-image">
  <Headline>Build Your SaaS Faster</Headline>
  <Subheadline>Start shipping in days, not months</Subheadline>
  <CTA primary="true" action="/signup">Get Started</CTA>
  <CTA action="#features">Learn More</CTA>
  <Image src="/assets/dashboard.png" alt="Dashboard" />
</Hero>

Summary

Functions

render(assigns)

Attributes

  • variant (:string) - Defaults to "centered".
  • children (:list) - Defaults to [].
  • attributes (:map) - Defaults to %{}.
  • content (:string) - Defaults to nil.