Comparison slider

A before/after image comparison.

After
Before
AfterBefore

No labels

After
Before

API reference

Inputs

PropTypeDefaultDescription
beforestring''Source URL of the "before" image (revealed on the left of the divider).
afterstring''Source URL of the "after" image (shown on the right of the divider).
beforeLabelstring''Caption badge shown over the "before" image; hidden when empty.
afterLabelstring''Caption badge shown over the "after" image; hidden when empty.
beforeAltstring'Before'Alt text for the "before" image.
afterAltstring'After'Alt text for the "after" image.
positionLabelstringAccessible label override for the range slider.

Two-way models

Bind with [(name)], or one-way as an input.

PropTypeDefaultDescription
valuenumber50Divider position as a percentage (0-100); two-way bindable.

Every ng-blatui component also accepts a class input to merge extra Tailwind classes onto the host.