popover

Source

Popover

This works without JavaScript.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

<drab-popover
    animation-keyframe-from-transform="scale(.95) translateY(3%)"
    animation-keyframe-from-opacity="0"
    animation-keyframe-to-transform="scale(1) translateY(0)"
    animation-keyframe-to-opacity="1"
>
    <button
        data-trigger
        popovertarget="popover"
        type="button"
        class="button button-primary"
    >
        Show
    </button>
    <div data-content id="popover" popover class="card sm:max-w-96">
        <div class="mb-4 flex items-center justify-between">
            <h3 class="my-0">Popover</h3>
            <button
                data-trigger
                popovertarget="popover"
                type="button"
                class="button button-ghost"
                title="Close"
            >
                <svg
                    xmlns="http://www.w3.org/2000/svg"
                    viewBox="0 0 24 24"
                    fill="currentColor"
                    class="size-6"
                >
                    <path
                        fill-rule="evenodd"
                        d="M5.47 5.47a.75.75 0 011.06 0L12 10.94l5.47-5.47a.75.75 0 111.06 1.06L13.06 12l5.47 5.47a.75.75 0 11-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 01-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 010-1.06z"
                        clip-rule="evenodd"
                    />
                </svg>
            </button>
        </div>
        <p>This works without JavaScript.</p>
        <p>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
            tempor incididunt ut labore et dolore magna aliqua.
        </p>
    </div>
</drab-popover>