Popover

You're browsing the documentation for an old version of MoonShine. Consider upgrading your project to MoonShine 2.x.

# Basics

Using the moonshine::popover component, you can create a popup window

Доступные расположения:

bottom top left right

<x-moonshine::popover title="Popover title" placement="right">
<x-slot:trigger>
<button class="btn">Popover</button>
</x-slot:trigger>
<p>This is a very beautiful popover, show some love.</p>
<div class='flex justify-between mt-3'>
<button type='button' class='btn btn-sm'>Skip</button>
<button type='button' class='btn btn-sm btn-primary'>Read More</button>
</div>
</x-moonshine::popover>

# Without use component

<span x-data="popover" data-content="HTML HERE">
<a class="text-purple font-semibold">Popover 1</a>
</span>
or
<span
x-data="popover({placement: 'top'})"
title="Popover title"
data-content="HTML HERE">
<a class="text-purple font-semibold">Popover 2</a>
</span>