Skip to content

Tooltip

Contextual hover/focus information displayed in a floating overlay.

Open in Storybook

Interactive Demo

Usage

vue
<script setup>
import { Tooltip, Button } from '@yellowcard/b2b-design-system';
</script>

<template>
  <Tooltip content="Click to submit the form" placement="top">
    <Button label="Submit" />
  </Tooltip>
</template>

API Reference

Props

PropTypeDefaultDescription
content*stringTooltip text content
placement'top' | 'bottom' | 'left' | 'right''top'Tooltip position
titlestringOptional title in tooltip
arrowbooleantrueShow arrow pointer
disabledbooleanfalseDisable tooltip
trigger'hover' | 'click' | 'focus''hover'Trigger interaction
delaynumberShow delay in ms

Slots

SlotBindingsDescription
defaultThe trigger element that shows the tooltip