Tesserae

DeltaComponent

Description

A component that animates changes

DeltaComponent updates its DOM tree to match a new component's DOM tree using a diff algorithm. It detects text appends and adds them as new spans to avoid full re-rendering.

This DeltaComponent renders its content inside a Shadow DOM root.

API reference

class

DeltaComponent

public class DeltaComponent : IComponent

A small inline metric showing the change between two values (with up/down arrow and tone for positive / negative / neutral deltas).

Constructors

Constructor
DeltaComponent
public DeltaComponent(IComponent initial, bool useShadowDom = false)

Initializes a new instance of this class.

Methods

Method
DeltaComponent.Animated
public DeltaComponent Animated()

Configures the component to animated.

Method
DeltaComponent.ReplaceContent
public void ReplaceContent(IComponent newContent)

Replaces the content in the component.

Method
DeltaComponent.Render
public HTMLElement Render()

Renders the component's root HTML element.

Samples

Basic Delta Animation

Shadow DOM

See also

© 2026 Tesserae. All rights reserved.