Skip to content

Migrating from ghl-ui Modal to HighRise Modal

This guide updates UIModalHLModal, covering props, events, and defaults.

Component Implementation Changes

Import Changes

diff
- import { UIModal } from '@gohighlevel/ghl-ui'
+ import { HLModal } from '@platform-ui/highrise'

Basic Usage

diff
- <UIModal v-model:show="open">Content</UIModal>
+ <HLModal id="confirm-modal" v-model:show="open">Content</HLModal>
vue
<template>
  <HLModal id="info-modal" v-model:show="open" type="info" show-footer>
    <template #header>Info</template>
    Body content goes here.
    <template #footer>
      <div class="flex justify-end gap-2">
        <HLButton id="cancel" variant="secondary" @click="open = false">Cancel</HLButton>
        <HLButton id="ok" color="blue" @click="onOk">OK</HLButton>
      </div>
    </template>
  </HLModal>
</template>

Props Changes

ghl-ui PropHighRise PropNotes
id (required)id (required)Required for accessibility
show / v-model:showshow / v-model:showSame, default false
maskClosablemaskClosableDefault true
closeOnEsccloseOnEscDefault true
type (default/info/success/warning/error)typeSame set; default default
widthwidthDefault 483
-showHeader, showFooter, showHeaderIcon, showClose, showBack, footerDividerVisibility toggles (defaults: header/footer/showClose/headerIcon = true; showBack=false)
-autoFocusDefault false
-classNameOptional extra class
-toTeleport target
-zIndexOverrides stacking

Events Changes

ghl-ui EventHighRise EventNotes
update:showupdate:showSame two-way binding
closecloseSame
-after-enter, after-leave, before-leave, esc, mask-click, back, left-click, right-primary-click, right-secondary-clickAdditional lifecycle and footer button events

Slots Changes

ghl-ui SlotHighRise SlotNotes
headerheaderSame
footerfooterSame; built-in footer available when slot absent
defaultdefaultSame

Breaking Changes

  1. Required id — HLModal requires id for accessibility.
  2. Footer defaults — Footer is shown by default; disable with showFooter=false or override via slot.
  3. Teleport targetto defaults to document body; set explicitly if portal conflicts.
  4. Type handlingtype drives header icon and styling; ensure mapped values.

Best Practices

  1. Provide id and aria labels via slots when content isn’t self-descriptive.
  2. Use v-model:show for two-way control; handle close/update:show to sync state.
  3. Turn off maskClosable/closeOnEsc for destructive flows.
  4. Use footerDivider when the footer needs separation from content.

MCPs: always set id; rely on v-model:show; disable maskClosable/closeOnEsc for destructive dialogs; prefer slot footer only when built-in buttons don’t fit.