Skip to content

Accessibility: Work in progress

Translations: Not Needed

Tooltip

Tooltip component

Variants

html
<template>
  <HLTooltip id="tooltip-default">
    <template #trigger>
      <HLButton id="tooltip-default-btn">Open Default Tooltip</HLButton>
    </template>
    <template #header> I am the heading </template>
    I am the content.
  </HLTooltip>
</template>
<script setup>
  import { HLTooltip } from '@platform-ui/highrise'
</script>
html
<template>
  <HLTooltip id="tooltip-dark" variant="dark">
    <template #trigger>
      <HLButton id="tooltip-dark-btn">Open Dark Tooltip</HLButton>
    </template>
    <template #header> I am the heading </template>
    I am the content.
  </HLTooltip>
</template>
<script setup>
  import { HLTooltip } from '@platform-ui/highrise'
</script>

Placements

When there is no space to show the tooltip in desired placement, then the tooltip will be shown other side where there is space.

Vue
html
<template>
  <HLTooltip id="tooltip-right-end" placement="right-end">
    <template #trigger>
      <HLButton id="tooltip-right-end-btn">right-end</HLButton>
    </template>
    <template #header> I am the heading </template>
    I am the content.
  </HLTooltip>
</template>
<script setup>
  import { HLTooltip, HLButton } from '@platform-ui/highrise'
</script>

Customized Styles

Vue
html
<template>
  <HLTooltip id="tooltip-customization" :header-style="{ backgroundColor: 'lightgray' }" :content-style="{ backgroundColor: 'lightgreen' }">
    <template #trigger>
      <HLButton id="tooltip-customization-btn">Open Customized Tooltip</HLButton>
    </template>
    <template #header> I am the heading </template>
    I am the content.
  </HLTooltip>
</template>
<script setup>
  import { HLTooltip, HLButton } from '@platform-ui/highrise'
</script>

Disabled

When the tooltip is disabled, it will not be shown.

Vue
html
<HLTooltip id="tooltip-disabled" :disabled="true">
  <template #trigger>
    <HLButton id="tooltip-disabled-btn">Disabled Tooltip</HLButton>
  </template>
  I am the content.
</HLTooltip>

Imports

ts
import { HLTooltip } from '@platform-ui/highrise'

Props

NameTypeDefaultDescription
id *stringundefinedThe id of the tooltip element
trigger'click' | 'hover' | 'focus' | 'manual' as PopoverTrigger'hover'The event that triggers the tooltip
placement'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end' | 'bottom-start' | 'bottom-end' as PlacementundefinedThe position of the tooltip relative to the target
showbooleanundefinedControls the visibility of the tooltip
variant'light' | 'dark''light'The visual style of the tooltip
headerStyleobject{}Custom styles for the tooltip header
contentStyleobject{}Custom styles for the tooltip content
tooltipStyleobject{}Custom styles for the tooltip
disabledbooleanundefinedWhether the tooltip is disabled

Emits

NameDefaultTrigger
@show(value: boolean) => voidon show status changes

Slots

NameParametersDescription
default()The content inside popover
trigger()The element or component that triggers popover
header()The header content of the popover