side-by-side comparison with a center divider.
Install
From your site folder, run:
jprot add BeforeAfterThat downloads the self-contained component into theme/components/BeforeAfter.js,
where it is picked up automatically — the same way as any built-in component.
To remove it later, just delete that file.
Use it as a homepage section
Add an entry to the sections: list in jprot.config.js:
sections: [
{ component: 'BeforeAfter', title: 'BeforeAfter' },
]Use it inside a page
On its own line in any Markdown file, passing the props:
:::BeforeAfter beforeLabel="Before" afterLabel="After" before="https://picsum.photos/seed/b1/600/420" after="https://picsum.photos/seed/b2/600/420"Props
| Prop | Type | Note |
|---|---|---|
before | string | left image |
after | string | right image |
beforeLabel | string | left caption |
afterLabel | string | right caption |