This component is used on the FTVA homepage to display a Before/After slider at the bottom of the page.
The slider will be part of a carousel, so the component should work as a child of ScrollWrapper.vue & include a story showing this
Please also see attached screenshots for quick reference.
props: {
beforeImage: {
type: Object,
default: () => {}
},
afterImage: {
type: Object,
default: () => {}
},
// might be better to implement in ScrollWrapper ?
caption: {
type: Object,
default: () => {}
},
}
"beforeAfterImageCarousel": [
{
"id": "4073994",
"beforeImage": [
{
"id": "4073988",
"src": "https://static.library.ucla.edu/craftassetstest/FTVA/_fullscreen/paris_1895.jpg",
"height": 1878,
"width": 2560,
"srcset": "https://static.library.ucla.edu/craftassetstest/FTVA/_375xAUTO_crop_center-center_none/paris_1895.jpg 375w, https://static.library.ucla.edu/craftassetstest/FTVA/_960xAUTO_crop_center-center_none/paris_1895.jpg 960w, https://static.library.ucla.edu/craftassetstest/FTVA/_1280xAUTO_crop_center-center_none/paris_1895.jpg 1280w, https://static.library.ucla.edu/craftassetstest/FTVA/_1920xAUTO_crop_center-center_none/paris_1895.jpg 1920w, https://static.library.ucla.edu/craftassetstest/FTVA/_2560xAUTO_crop_center-center_none/paris_1895.jpg 2560w",
"alt": null,
"focalPoint": [
0.5,
0.5
]
}
],
"afterImage": [
{
"id": "4073990",
"src": "https://static.library.ucla.edu/craftassetstest/FTVA/_fullscreen/paris_2013.jpg",
"height": 1878,
"width": 2560,
"srcset": "https://static.library.ucla.edu/craftassetstest/FTVA/_375xAUTO_crop_center-center_none/paris_2013.jpg 375w, https://static.library.ucla.edu/craftassetstest/FTVA/_960xAUTO_crop_center-center_none/paris_2013.jpg 960w, https://static.library.ucla.edu/craftassetstest/FTVA/_1280xAUTO_crop_center-center_none/paris_2013.jpg 1280w, https://static.library.ucla.edu/craftassetstest/FTVA/_1920xAUTO_crop_center-center_none/paris_2013.jpg 1920w, https://static.library.ucla.edu/craftassetstest/FTVA/_2560xAUTO_crop_center-center_none/paris_2013.jpg 2560w",
"alt": null,
"focalPoint": [
0.5,
0.5
]
}
],
"caption": "Paris"
}
Component Description
This component is used on the FTVA homepage to display a Before/After slider at the bottom of the page.
It takes 2 images and overlays them with a slider like so: https://codepen.io/Coding-in-Public/pen/NWyjZwO
The slider will be part of a carousel, so the component should work as a child of ScrollWrapper.vue & include a story showing this
Design
Please also see attached screenshots for quick reference.
Slots
No slots needed.
Props
Developer Tips
ScrollWrapper.vue. Can it be modified to cleanly page between items? Or do we need to use our carousel component instead?Child components
ResponsiveImagecomponent to display before/after images.Screenshots