Skip to content

Early previewhamur is not on npm yet. The components are being built in the open, follow along on GitHub.

CompareOverlays

Popconfirm in five frameworks

The same example, live in each framework. One core underneath, so they should behave the same.

Back to the Popconfirm docs

Live

React

Loading19.3.1

Loading React…

No event yet

Vue

Loading3.5.44

Loading Vue…

No event yet

Svelte

Loading5.57.3

Loading Svelte…

No event yet

Solid

Loading2.0.0-rc.21

Loading Solid…

No event yet

Angular

Loading22.2.4

Loading Angular…

No event yet

The attributes each framework puts on the open popup, read from the page.

AttributeReactVueSvelteSolidAngular
roleClosedClosedClosedClosedClosed
aria-modalClosedClosedClosedClosedClosed
aria-labelledbyClosedClosedClosedClosedClosed
data-openClosedClosedClosedClosedClosed

Nothing open. Open a tile to fill its column.

Each tile sets modal to false, so five popups can be open at once; that is why aria-modal reads absent.

The same example, in each framework

Each tile above runs this file.

Popconfirm.tsx
import { Popconfirm } from '@hamur/react/popconfirm'

export default function PopconfirmExample() {
  return (
    <Popconfirm.Root>
      <Popconfirm.Trigger className="button danger">
        Delete
      </Popconfirm.Trigger>
      <Popconfirm.Portal>
        <Popconfirm.Positioner sideOffset={8}>
          <Popconfirm.Popup className="popover">
            <Popconfirm.Arrow className="arrow" />
            <Popconfirm.Title className="popover-title">
              Delete this item?
            </Popconfirm.Title>
            <Popconfirm.Description className="muted">
              This cannot be undone.
            </Popconfirm.Description>
            <div className="actions">
              <Popconfirm.Cancel className="button">
                Cancel
              </Popconfirm.Cancel>
              <Popconfirm.Confirm className="button danger">
                Delete
              </Popconfirm.Confirm>
            </div>
          </Popconfirm.Popup>
        </Popconfirm.Positioner>
      </Popconfirm.Portal>
    </Popconfirm.Root>
  )
}

Measured, per framework

The frameworks against each other only, on the same machine and the same example.

FrameworkTestsSizeOpenCloseMemory
ReactNot measured yet59.8 KiBNot measured yetNot measured yetNot measured yet
VueNot measured yet57.9 KiBNot measured yetNot measured yetNot measured yet
SvelteNot measured yet58.4 KiBNot measured yetNot measured yetNot measured yet
SolidNot measured yet57.8 KiBNot measured yetNot measured yetNot measured yet
AngularNot measured yet66.0 KiBNot measured yetNot measured yetNot measured yet

Size is the gzip of the component's entry with core and dom. Open, Close and Memory are medians in Chromium 156 on Apple M3 Max; Memory is what one open and close leaves on the heap. Tests are Popconfirm's passing tests in each framework's suites. [N] is a value not measured yet.

Same props, five spellings

The Popconfirm.Root names in each framework's own syntax.

PropReactVueSvelteSolidAngular
defaultOpendefaultOpendefault-opendefaultOpendefaultOpen[defaultOpen]
openopenopenopenopen[open]
onOpenChangeeventonOpenChange@open-changeonOpenChangeonOpenChange(openChange)
onOpenChangeCompleteeventonOpenChangeComplete@open-change-completeonOpenChangeCompleteonOpenChangeComplete(openChangeComplete)
onConfirmeventonConfirmon-confirmonConfirmonConfirm—
actionsRefactionsRefactions-refactionsRefactionsRef[actionsRef]
modalmodalmodalmodalmodal[modal]
triggerIdtriggerIdtrigger-idtriggerIdtriggerId[triggerId]
defaultTriggerIddefaultTriggerIddefault-trigger-iddefaultTriggerIddefaultTriggerId[defaultTriggerId]
handlehandlehandlehandlehandle[handle]
childrenchildren#defaultchildrenchildrenng-content