Popover

A glass popover that grows out of its trigger.

Installation#

pnpmnpmyarnbun
$ pnpm dlx shadcn@latest add @liquikit/popover

Needs the @liquikit registry in your components.json. Set it up once.

Usage#

import { Popover } from "@/components/liquikit/popover"
<Popover.Root>
  <Popover.Trigger>Details</Popover.Trigger>
  <Popover.Popup>
    <Popover.Title>Refraction</Popover.Title>
    <Popover.Description>How light bends through glass.</Popover.Description>
  </Popover.Popup>
</Popover.Root>

API Reference#

Popover.Root

PropTypeDefault
openboolean

Whether the popup is open. Pair it with onOpenChange to control it.

—

Also takes every prop of Base UI's popover, plus className and style.

Popover.Popup

PropTypeDefault
sideBasePopover.Positioner.Props["side"]

Which side of the trigger the popup opens on.

"bottom"
alignBasePopover.Positioner.Props["align"]

How the popup lines up with its trigger along that side.

"center"
sideOffsetnumber

Gap between the trigger and the popup, in pixels.

10
theme"light" | "dark"

Light or dark glass. Falls back to the nearest GlassThemeProvider, then light.

—
refraction"interactive" | "always"

When the glass bends the page. interactive bends it while the component is pressed, dragged or focused, always bends it all the time.

"interactive"
childrenReactNode

The content.

—

Also takes every prop of Base UI's popover, plus className and style.