Migrating from ghl-ui PerformanceEllipsis to HighRise Ellipsis
This guide helps you migrate from the legacy UIPerformanceEllipsis component to the new HLEllipsis component. The new component provides improved accessibility, richer tooltip control, and clearer prop names.
Component Implementation Changes
Import Changes
diff
- import { UIPerformanceEllipsis } from '@gohighlevel/ghl-ui'
+ import { HLEllipsis } from '@platform-ui/highrise'Basic Usage Changes
diff
- <UIPerformanceEllipsis :line-clamp="2">
- {{ longText }}
- </UIPerformanceEllipsis>
+ <HLEllipsis id="my-ellipsis" :line-clamp="2" :tooltip-props="{ width: 400 }">
+ {{ longText }}
+ </HLEllipsis>Props Changes
| ghl-ui Prop | HighRise Prop | Notes |
|---|---|---|
expandTrigger | expandOn | Values: 'click', 'hover', 'focus', 'manual' |
lineClamp | lineClamp | Number only |
tooltip | tooltipProps | Accepts HLPopover props (placement, trigger, width, delay, offset…) |
| - | showTooltip | Boolean to toggle tooltip rendering (default: true) |
| - | id | Optional; defaults to hr-ellipsis-id |
Slots Changes
| ghl-ui Slot | HighRise Slot | Notes |
|---|---|---|
tooltip | tooltip | Enhanced with HighRise popover support |
Examples
Basic Single-line Ellipsis
vue
<template>
<HLEllipsis id="basic-ellipsis" :tooltip-props="{ width: 400 }">
This is a very long text that will be truncated with an ellipsis.
</HLEllipsis>
</template>
<script setup>
import { HLEllipsis } from '@platform-ui/highrise'
</script>Multi-line Ellipsis with Custom Tooltip
vue
<template>
<HLEllipsis
id="multi-line-ellipsis"
:line-clamp="2"
:tooltip-props="{
placement: 'right',
trigger: 'hover',
width: 300,
delay: 100,
offset: 12,
}"
>
<template #tooltip>
<div class="custom-tooltip">
<h4>Custom Tooltip Header</h4>
<p>{{ longText }}</p>
</div>
</template>
{{ longText }}
</HLEllipsis>
</template>
<script setup>
import { HLEllipsis } from '@platform-ui/highrise'
const longText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
</script>Click to Expand Without Tooltip
vue
<template>
<HLEllipsis id="expandable-ellipsis" :line-clamp="2" expand-on="click" :show-tooltip="false">
{{ longText }}
</HLEllipsis>
</template>
<script setup>
import { HLEllipsis } from '@platform-ui/highrise'
const longText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...'
</script>With Form Integration
vue
<template>
<HLFormItem label="Description">
<HLEllipsis
id="form-ellipsis"
:line-clamp="3"
:tooltip-props="{
placement: 'top',
width: 400,
}"
>
{{ description }}
</HLEllipsis>
</HLFormItem>
</template>
<script setup>
import { HLEllipsis, HLFormItem } from '@platform-ui/highrise'
const description = 'Long form description text...'
</script>Breaking Changes
tooltipnow expectsHLPopoverprops (orfalse); booleans are no longer accepted directly.lineClamponly accepts numbers.expandTrigger➜expandOn.- Tooltip rendering can be disabled via
show-tooltip(default is enabled).
Best Practices
- Use
line-clampfor multi-line truncation; omit it for single-line truncation. - Disable the tooltip with
show-tooltip="false"when content is short or already visible. - Keep tooltip widths reasonable (200–400px) and aligned with placement.
- Choose
expand-on="click"for interactive contexts;hoverfor passive previews. - Provide
idfor deterministic testing hooks when needed; otherwise the component supplies one.
Common Patterns
Table Cell Content
vue
<template>
<HLTable>
<HLTableCell>
<HLEllipsis
:id="`cell-${rowId}`"
:line-clamp="1"
:tooltip-props="{
placement: 'top',
width: 300,
}"
>
{{ cellContent }}
</HLEllipsis>
</HLTableCell>
</HLTable>
</template>Card Description
vue
<template>
<HLCard>
<HLEllipsis :id="`card-${cardId}`" :line-clamp="3" expand-on="click" :show-tooltip="false">
{{ cardDescription }}
</HLEllipsis>
</HLCard>
</template>List Item
vue
<template>
<HLList>
<HLListItem>
<HLEllipsis
:id="`list-${itemId}`"
:line-clamp="2"
:tooltip-props="{
placement: 'right',
width: 250,
}"
>
{{ itemContent }}
</HLEllipsis>
</HLListItem>
</HLList>
</template>