Popover

A floating panel with content in it, as opposed to a menu of rows. Kobalte's Popover renders its content as role="dialog" and positions it with a popper; these classes only paint.

alpha The class names and states here are stable. The look is not: these styles can change in a minor release, without a major version bump.

ClassDoes what
popover-contentThe panel: raised surface, border, shadow
popover-titleIts heading
popover-descriptionMuted body text

Basic

<div class="popover-content">
  <h2 class="popover-title">Share this page</h2>
  <p class="popover-description">Anyone with the link can read it.</p>
</div>

Dialog.Content is also role="dialog", and Kobalte marks them the same way, so a Kobalte dialog picks up this panel too. Add .dialog-box to it if you want the modal sizing as well.

Composition

Common ways to put this together with other components. The general rules are on Composition.

Share with a field

A popover holding a title, a line, and a field with a copy button.

Same markup in both builds
<div class="popover-content" style="max-width: 22rem">
  <h2 class="popover-title">Share this page</h2>
  <p class="popover-description">Anyone with the link can read it.</p>
  <div class="field-row" style="margin-top: var(--space-sm)">
    <input class="input" value="https://example.com/page" readonly />
    <button class="btn btn-secondary">Copy</button>
  </div>
</div>