Skip to content

Migrating from ghl-ui Checkbox to HighRise Checkbox

This guide migrates UICheckbox to HLCheckbox, reflecting actual props, sizes, and events.

Component Implementation Changes

Import Changes

diff
- import { UICheckbox } from '@gohighlevel/ghl-ui'
+ import { HLCheckbox } from '@platform-ui/highrise'

Basic Usage

diff
- <UICheckbox id="agree" v-model:checked="checked">Agree</UICheckbox>
+ <HLCheckbox id="agree" v-model:checked="checked">Agree</HLCheckbox>

Props Changes

ghl-ui PropHighRise PropNotes
id (required)id (required)Same
checkedcheckedSame
indeterminateindeterminateSame
disableddisabledSame
size (small/medium/large, default large)size (lg/md/sm/xs/2xs/3xs, default md)Map large→md, medium→sm, small→xs
type (default/image)-Image checkbox not supported; use composition instead
src/fallbackSrc-Not supported; compose avatar/image alongside checkbox

Emits Changes

ghl-ui EventHighRise EventNotes
update:checkedupdate:checkedSame signature (value, event)
onSelect (image variant)-Not supported; handle click on composed image element

Slots Changes

ghl-ui SlotHighRise SlotNotes
defaultdefaultSame for label content

Size Mapping

ghl-ui SizeHighRise Size
largemd
mediumsm
smallxs
(unset)md

Breaking Changes

  1. No image checkboxtype="image", src, fallbackSrc removed; compose image + checkbox manually.
  2. Size tokens — map small/medium/large to HighRise sizes; default is md.
  3. Events — only update:checked is emitted; no onSelect shortcut.

Best Practices

  1. Always set id for accessibility and testing.
  2. When migrating image checkboxes, wrap HLCheckbox with an image/avatar component and manage selection in parent state.
  3. Keep labels concise; use the default slot for custom label content.

MCPs: map sizes large/medium/smallmd/sm/xs; drop image checkbox props—compose images externally; rely on v-model:checked for state sync.