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 Prop | HighRise Prop | Notes |
|---|---|---|
id (required) | id (required) | Same |
checked | checked | Same |
indeterminate | indeterminate | Same |
disabled | disabled | Same |
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 Event | HighRise Event | Notes |
|---|---|---|
update:checked | update:checked | Same signature (value, event) |
onSelect (image variant) | - | Not supported; handle click on composed image element |
Slots Changes
| ghl-ui Slot | HighRise Slot | Notes |
|---|---|---|
default | default | Same for label content |
Size Mapping
| ghl-ui Size | HighRise Size |
|---|---|
large | md |
medium | sm |
small | xs |
| (unset) | md |
Breaking Changes
- No image checkbox —
type="image",src,fallbackSrcremoved; compose image + checkbox manually. - Size tokens — map
small/medium/largeto HighRise sizes; default ismd. - Events — only
update:checkedis emitted; noonSelectshortcut.
Best Practices
- Always set
idfor accessibility and testing. - When migrating image checkboxes, wrap
HLCheckboxwith an image/avatar component and manage selection in parent state. - Keep labels concise; use the default slot for custom label content.
MCPs: map sizes large/medium/small → md/sm/xs; drop image checkbox props—compose images externally; rely on v-model:checked for state sync.