Landing
LandingBeforeAfter
Before and after comparison dragged from a handle on the image (keyboard accessible), highlighted result figures, an optional link and thumbnails to switch case.
components/landing/LandingBeforeAfter.vue
View in the demo
Example
Café Brumal: from brochure site to booking machine
Slide to compare the old website with the new one.
Before
After
New website with two-step booking
New structure, optimised photos and bookings from the homepage. Launched in 5 weeks.
- bookings
- +48%
- load time on mobile
- 1.1 s
In your content
Section blocks are rendered by LandingRenderer from the sections array of a landing. Add this one to your content:
sections: [
{
type: 'beforeAfter',
tone: 'surface',
props: { … },
},
]
The props follow LandingBeforeAfterProps in types/components/landing.ts; the table below lists them.
API
Props
Name | Type | Default | Description |
|---|---|---|---|
itemsrequired | LandingComparison[] | — | The entries of the block. before and after take src, alt and an optional darkSrc shown in dark mode, so a light mockup does not glare on a dark page. |
eyebrow | string | — | A short label above the title. |
title | string | — | The heading of the block. |
description | string | — | The sentence under the title. |
heading-id | string | — | The id of the heading, used by aria-labelledby and anchors. |
align | LandingHeadingAlign | "start" | start or center heading. |