Skip to content
Components/Data displayIntroduced in 1.3.0

ECompare Compare ​

import EUI 1.0

Examples ​

Drag comparison ​

QML sourceQML
Preview
Run the code to try the component

Edit text, properties, or events, then select Run.

Code runs in this browser Licenses

Hover comparison ​

QML sourceQML
Preview
Run the code to try the component

Edit text, properties, or events, then select Run.

Code runs in this browser Licenses

Vertical comparison ​

QML sourceQML
Preview
Run the code to try the component

Edit text, properties, or events, then select Run.

Code runs in this browser Licenses

Custom handle ​

QML sourceQML
Preview
Run the code to try the component

Edit text, properties, or events, then select Run.

Code runs in this browser Licenses

Keyboard and endpoints ​

QML sourceQML
Preview
Run the code to try the component

Edit text, properties, or events, then select Run.

Code runs in this browser Licenses

Properties ​

PropertyDescriptionValues and default
valuereal

Percentage of the before content revealed, from 0 to 100.

Default50
hoverbool

Update comparison ratio on pointer hover.

Defaultfalse
afterSourceurl

Image URL for the after layer.

Default""
beforeSourceurl

Image URL for the before layer.

Default""
verticalbool

Use a horizontal divider to reveal content vertically.

Defaultfalse
afterComponentComponent

Custom content replacing the after image.

Defaultnull
beforeComponentComponent

Custom content replacing the before image.

Defaultnull
handleComponentComponent

Custom comparison handle content.

Defaultnull
fractionrealRead only

Comparison fraction clamped between 0 and 1.

DefaultisFinite(value) ? Math.max(0, Math.min(100, value)) / 100 : 0.5

Signals ​

SignaturePurpose
moved(real value)

Emitted when the user adjusts the comparison divider; value is its position.

Methods ​

SignaturePurpose
setValue(next)

Set a new numeric value within the component limits.

Released under the MIT License. Third-party assets retain their own licenses.