CompareItem
Place before or after content inside a Compare composition.
import { NeuCompareItemComponent } from '@neural-ui/core/compare';Auxiliary piece of Compare
Examples
Events: 0
Try and configure
Events: 0
<neu-compare
class="remaining-compare"
[value]="position()"
(valueChange)="position.set($event.value)"
(valueChangeEnd)="record('valueChangeEnd', $event.value)"
[orientation]="'horizontal'"
[disabled]="false"
[slideOnHover]="false"
[step]="5"
><neu-compare-item position="before"
><div class="remaining-compare-surface remaining-before remaining-compare-surface--image">
<img class="remaining-compare-image" src="assets/media/coast.svg" [alt]="t('Coastal light before color adjustment', 'Luz de costa antes del ajuste de color')" width="800" height="450" draggable="false" />
<span class="remaining-compare-caption">{{ t("Before", "Antes") }}</span>
</div></neu-compare-item
><neu-compare-item position="after"
><div class="remaining-compare-surface remaining-after remaining-compare-surface--image">
<img class="remaining-compare-image" src="assets/media/coast.svg" [alt]="t('Coastal light after color adjustment', 'Luz de costa despuรฉs del ajuste de color')" width="800" height="450" draggable="false" />
<span class="remaining-compare-caption">{{ t("After", "Despuรฉs") }}</span>
</div></neu-compare-item
><neu-compare-indicator
><span class="remaining-compare-line"></span></neu-compare-indicator
><neu-compare-handle
[ariaLabel]="t('Compare position', 'Posiciรณn de comparaciรณn')"
></neu-compare-handle
></neu-compare
>
State and events
Accessibility and keyboard
API
Inputs
Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.
Templates
ng-content projects content into the component. TemplateRef inputs receive a template; ng-template directives identify templates with a typed context. A directive shared by an entrypoint is not necessarily a slot of this component.
Each example demonstrates a different template. Switch between Demo and Code to inspect its implementation, imports and state.
Projected content
*
Events: 0
Public Types
Open a type to inspect its definition and interface fields.
Styles and tokens
Specific tokens
This component uses shared theme tokens rather than dedicated component hooks.
Shared tokens used
Override these on a local wrapper to affect this example. An override on :root affects other components that use the same token.