mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-19 14:31:47 +01:00
47 lines
703 B
Markdown
47 lines
703 B
Markdown
---
|
|
description: Display content that appears on hover next to an element.
|
|
links:
|
|
- label: GitHub
|
|
icon: i-simple-icons-github
|
|
to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/overlays/Tooltip.vue
|
|
---
|
|
|
|
## Usage
|
|
|
|
::component-example
|
|
#default
|
|
:tooltip-example
|
|
#code
|
|
```vue
|
|
<template>
|
|
<UTooltip text="Tooltip example" :shortcuts="['⌘', 'O']">
|
|
<UButton color="gray" label="Hover me" />
|
|
</UTooltip>
|
|
</template>
|
|
```
|
|
::
|
|
|
|
## Slots
|
|
|
|
### `text`
|
|
|
|
Use the `#text` slot to override the content of the text.
|
|
|
|
::component-card
|
|
---
|
|
slots:
|
|
text: <span class="italic">Hello World!</span>
|
|
---
|
|
|
|
#text
|
|
[Hello World!]{.italic}
|
|
::
|
|
|
|
## Props
|
|
|
|
:component-props
|
|
|
|
## Preset
|
|
|
|
:component-preset
|