WS
Docs /Atomes/Tooltip

Tooltip

Info-bulle contextuelle affichée au survol d'un élément. Supporte plusieurs positions et couleurs.

Blade
Aperçu
<x-ws::tooltip text="Ceci est une info-bulle">
    <x-ws::button>Survolez-moi</x-ws::button>
</x-ws::tooltip>

Props

Prop Type Défaut Description
text string Texte affiché dans l'info-bulle
position string top top | bottom | left | right
color string dark dark | light
arrow bool true Affiche une flèche pointant vers l'élément
delay int 0 Délai avant l'affichage en millisecondes

Positions

<x-ws::tooltip text="Haut" position="top">...</x-ws::tooltip>
<x-ws::tooltip text="Bas" position="bottom">...</x-ws::tooltip>
<x-ws::tooltip text="Gauche" position="left">...</x-ws::tooltip>
<x-ws::tooltip text="Droite" position="right">...</x-ws::tooltip>

Couleurs

<x-ws::tooltip text="Info-bulle sombre" color="dark">
    <x-ws::button>Dark</x-ws::button>
</x-ws::tooltip>

<x-ws::tooltip text="Info-bulle claire" color="light">
    <x-ws::button>Light</x-ws::button>
</x-ws::tooltip>

Sur des icônes

<x-ws::tooltip text="Modifier" position="top">
    <button class="p-2 rounded-lg hover:bg-zinc-100">
        <x-ws::icon name="pencil" />
    </button>
</x-ws::tooltip>