Skip to content
Pebble Pro is here at $49 one timeSee what’s included ↗
Pebble
ComponentsDocsMCPPricing
⌕ Find a component↗Log in
All components 673

Categories

Core inputs & forms46Buttons & actions33Navigation36Overlays & feedback49Data display33Charts & data viz40Cards & layout43Marketing blocks38App shells & pages37AI interfaces40Text & typography effects33Backgrounds & visual effects38Motion & transitions32Numbers & counters32Media34E-commerce333D & interactive36Themed sets40
Start with the essentials.Installation guide ↗Connect your agent ↗
← All componentsOverlays & feedback

Popover

A floating panel anchored to a trigger for short interactive content, built on the Radix Popover primitive.

Preview

LAUNCH-24

Launch checklist

In progress
  • Freeze copy for the release notes
  • Record the 40-second walkthrough
  • Schedule the announcement email

Install

Add the editable source with the shadcn CLI. Your project also needs the shared theme tokens this component uses. Setup and requirements. The Pebble installer is not published yet.

npx shadcn@latest add https://pebbleui.com/r/popover.json

Props

PropTypeDefaultDescription
openboolean—Controlled open state (root).
defaultOpenbooleanfalseUncontrolled initial state (root).
onOpenChange(open: boolean) => void—Called when the open state changes (root).
side"top" | "right" | "bottom" | "left""bottom"Preferred side (PopoverContent).
align"start" | "center" | "end""center"Alignment against the anchor (PopoverContent).
sideOffsetnumber6Gap in px from the anchor (PopoverContent).
Build notes
Radix `Popover` handles placement (floating-ui), collision avoidance, dismissal and
focus. The panel uses `card` tokens with a border and `shadow-md`. Radix exposes
`--radix-popover-content-transform-origin`, which `origin-(...)` applies so the panel
scales out of the anchor. Keyframes in the registry item `css` field: `popover-in`
(opacity 0 and scale 0.96 to 1, 150 ms ease-out) and `popover-out` (reverse, 100 ms
ease-in), keyed on `data-state` under `motion-safe:`. Default `sideOffset` is 6 px
(shadcn uses 4) to leave room for the focus ring of the trigger.

**Pebble (2026-11-03).** The panel is now a Pebble raised surface: `rounded-xl bg-card`
with `ring-1 ring-hairline`, `shadow-raised-md` and `inset-shadow-highlight` in place of
the border and `shadow-md`, so it reads as the same material as cards and menus. Forced
colors keep a `CanvasText` border. Timings move to tokens: `popover-in` runs at
`--motion-base` / `--motion-enter`, `popover-out` at `--motion-fast` / `--motion-exit`,
still under `motion-safe:` (the item may only use its own keyframes, so there is no
reduced-motion fade). The demo is a task card ("Launch checklist") whose chips are the
triggers: an owner picker (list of people with roles, `PopoverClose` on pick, check on
the current owner), a due-date picker, and a Share panel (`align="end"`, `w-80`) with a
read-only link, a Copy button that flips to Copied and resets on close, a workspace
access segmented radiogroup and an avatar row. A unit test pins the raised-surface
classes.

<!-- PEBBLE-LICENSE -->
View source

registry/overlay/popover/popover.tsx

"use client";

/* PEBBLE-LICENSE
Built by Pebble. Component: popover.

First-party license: MIT

The following first-party terms apply only to original Pebble material.

MIT License

Copyright (c) 2026 Praxys Solutions LLC (Pebble)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

THIRD-PARTY NOTICES
These notices apply to identified upstream portions; Pebble terms do not replace or narrow their rights.

Upstream: https://raw.githubusercontent.com/shadcn-ui/ui/main/LICENSE.md
MIT License

Copyright (c) 2023 shadcn

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
END PEBBLE-LICENSE */

import * as React from "react";
import { Popover as PopoverPrimitive } from "radix-ui";

import { cn } from "@/lib/utils";

export function Popover(props: React.ComponentProps<typeof PopoverPrimitive.Root>) {
  return <PopoverPrimitive.Root data-slot="popover" {...props} />;
}

export function PopoverTrigger(props: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
  return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
}

export function PopoverAnchor(props: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
  return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
}

export function PopoverClose(props: React.ComponentProps<typeof PopoverPrimitive.Close>) {
  return <PopoverPrimitive.Close data-slot="popover-close" {...props} />;
}

export function PopoverContent({
  className,
  align = "center",
  sideOffset = 6,
  ...props
}: React.ComponentProps<typeof PopoverPrimitive.Content>) {
  return (
    <PopoverPrimitive.Portal>
      <PopoverPrimitive.Content
        data-slot="popover-content"
        align={align}
        sideOffset={sideOffset}
        className={cn(
          "z-50 w-72 max-w-[calc(100vw-2rem)] rounded-xl bg-card p-4 text-sm text-card-foreground outline-none",
          // Pebble raised object: hairline ring, mid shadow, top highlight.
          "shadow-raised-md ring-1 inset-shadow-highlight ring-hairline",
          "forced-colors:border forced-colors:border-[CanvasText]",
          // Grow out of the trigger: Radix sets the origin to the anchor side.
          "origin-(--radix-popover-content-transform-origin)",
          "motion-safe:data-[state=open]:animate-[popover-in_var(--motion-base)_var(--motion-enter)]",
          "motion-safe:data-[state=closed]:animate-[popover-out_var(--motion-fast)_var(--motion-exit)]",
          className,
        )}
        {...props}
      />
    </PopoverPrimitive.Portal>
  );
}
Pebble

Small details.
Better interfaces.

React components to explore, make your own, and build on.

Library

  • Components
  • Installation
  • Pricing

Resources

  • For agents
  • About
  • Support

Legal

  • License
  • Terms
  • Privacy
  • Final sale

Built by Pebble

A product of Praxys Solutions LLC ↗

Pebble Pro is live

$49 one time, lifetime updates ↗