Guides
Navigation
Feedback
Overlays
Layout
Data Display
Forms
.md

Overlays

hover-card

Preview card shown when a trigger is hovered or focused.

Installation

php artisan ui:add hover-card

Usage

<x-ui.hover-card side="top">
    <x-slot:trigger>
        <x-ui.button variant="link">@abdulkadersafi</x-ui.button>
    </x-slot:trigger>

    <p class="text-sm text-muted-foreground">Builds LaralCN-UI.</p>
</x-ui.hover-card>

CSS only, no JavaScript: opens on hover and on keyboard focus. Put the trigger in the `trigger` slot and the card body in the default slot. Sides: top, bottom, left, right.

Props

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

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