sigilUI

Before After Diagram

A side-by-side comparison with color-coded before (error) and after (success) panels.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { BeforeAfterDiagram } from "@sigil-ui/components";

Usage

<BeforeAfterDiagram
  before={<p>Manual deploys, 2-hour rollbacks</p>}
  after={<p>CI/CD pipeline, 30-second rollbacks</p>}
/>

Custom titles

<BeforeAfterDiagram
  beforeTitle="Legacy"
  afterTitle="Modern"
  before={<p>Monolith on bare metal</p>}
  after={<p>Microservices on Kubernetes</p>}
/>

Props

PropTypeDefaultDescription
beforeTitlestring"Without"Label for the before panel
afterTitlestring"With"Label for the after panel
beforeReactNode—Content for the before panel (required)
afterReactNode—Content for the after panel (required)
classNamestring—Additional CSS classes

Plus all standard <div> HTML attributes.