Skip to content
daisyBlazor

Diff

A before/after comparison with a draggable divider, built on daisyUI's diff. Item1 and Item2 take any content; AspectClass sets the frame ratio.
Data display.diff
Cover · <Diff>
After Dashboard
v2
Before Dashboard
v1

Examples

Images

The classic use: two versions of the same picture.

Full resolution
Low resolution
website/Examples/DataDisplay/DiffImagesExample.razor Source

Any content

Panes can hold text or components: style the same word twice and drag to reveal it. AspectClass changes the ratio.

ACME
ACME
website/Examples/DataDisplay/DiffTextExample.razor Source

API

<Diff>

DaisyBlazor

Parameters

  • AspectClass string
    = "aspect-16/9"

    Tailwind aspect-ratio utility applied to the root element (e.g. "aspect-16/9", "aspect-4/3", "aspect-square"). Defaults to "aspect-16/9".

  • Item1Label string
    = null

    Accessible name of the first pane; when set the pane is exposed as role="img".

  • Item2Label string
    = null

    Accessible name of the second pane; when set the pane is exposed as role="img".

  • Class string
    = null

    Additional CSS classes merged onto the diff container.

  • Style string
    = null

    Inline styles applied to the diff container.

Content

  • Item1 RenderFragment

    Content rendered in the first (left/bottom) diff pane.

  • Item2 RenderFragment

    Content rendered in the second (right/top) diff pane.

Something went wrong while running the docs. Reload