Landing
LandingRenderer
Maps each section of the content to its block component and wraps it in LandingSection.
To add a block type: write its props interface in types/components/landing.ts, its component in components/landing/, add it to the LandingBlock union, define it in this file with defineLazyHydrationComponent('visible', () => import('~/components/landing/<Name>.vue')) and add it to LANDING_BLOCKS, and give it a showcase in pages/ui/landing.vue.
Performance
The hero is imported normally so its heading, text and buttons are interactive at once. Every other block is still rendered on the server, so its content and SEO are intact, but it only downloads its code and hydrates when it comes within 300px of the viewport. On a mid-range phone this removes most of the work the browser does on load. Do not import blocks statically here: that would bring every block back into the first load.
API
Props
Name | Type | Default | Description |
|---|---|---|---|
blocksrequired | LandingBlock[] | — | The sections to render. |
handlers | LandingHandlers | {} | The submit handlers: quote, contact, lead, booking, waitlist. |