Vehicle Comparison
Vehicle Comparison is a feature of the Vehicle Search Form, not a standalone embeddable component. There is no data-carpose-component="comparison" — it is enabled with the data-compare attribute on the search form.
Introduction
When comparison is enabled, visitors can add up to 3 vehicles to a comparison list (persisted in localStorage) and view them side by side in a modal. The comparison shows key specifications — price and VAT, registration date and mileage, power and engine, transmission and fuel type, and additional specs.
Enabling Comparison
<div
data-carpose-component="vehicle-search-form"
data-api-key="your-api-key"
data-compare="true"
></div>Behavior
A comparison button appears on vehicle cards and detail pages (including an icon overlay on thumbnails), and a floating comparison button opens the side-by-side view
Comparison state persists across sessions via
localStorageResponsive layout: 1 vehicle (full width), 2 vehicles (50/50), 3 vehicles (equal thirds); mobile uses a horizontal scroll view
A warning is shown when trying to add more than 3 vehicles
Notes
Can be combined with the Wishlist (
data-wishlist="true")For the full list of search-form options, see the Vehicle Search Form
Last updated