Guides
Navigation
Feedback
Overlays
Layout
Data Display
Forms
.md

Overlays

tooltip

Hover/focus tooltip with side positioning.

Installation

php artisan ui:add tooltip

Usage

<x-ui.tooltip text="Add to library">
    <x-ui.button variant="outline">Hover me</x-ui.button>
</x-ui.tooltip>

{{-- side: top (default), right, bottom or left --}}
<x-ui.tooltip text="Deletes the project for everyone" side="right">
    <x-ui.button variant="destructive">Delete</x-ui.button>
</x-ui.tooltip>

Pure CSS (hover plus focus-within), no JavaScript at all. Wrap the trigger in the slot; pass `text` and optional `side` (top|bottom|left|right).

Props

Every prop with its default. Pass any of them as attributes, using : to bind a PHP value.

@props([
    'text' => '',
    'side' => 'top',
])