Popover

Popover is a neobrutalist React component from Cruise UI. A small panel tied to a button: a title, content and actions; a bottom sheet on phones for longer content. Install it with npx shadcn@latest add @cruiseui/popover.

Install

Terminal

npx shadcn@latest add @cruiseui/popover

First time? Installation shows the one-off components.json setup (the @cruiseui registry) and how to turn the theme on.

Example

Corners

When to use it

When to use

Extra detail or a quick action next to what it's about: how a fee is worked out, a share menu, a short form.

When not to

Hints on hover (use a Tooltip). Anything that needs the whole screen's attention (use a Modal).

Props

CruisePopover

PropTypeDefaultDescription
triggerReactElement<unknown, string | JSXElementConstructor<any>>—The button that opens it (gets aria-expanded / aria-controls).
title?ReactNode——
childrenReactNode——
actions?ReactNode | ((close: () => void) => ReactNode)—Buttons under the content; a function gets `close`.
arrow?booleantrue—
side?"left" | "right" | "top" | "bottom""bottom"—
align?"center" | "start" | "end""center"—
sheet?booleanfalseBelow 640px, open as a bottom sheet instead (for long content).
open?boolean——
onOpenChange?((open: boolean) => void)——
popupClassName?string——

Accessibility

  • Opens on click; Esc and a click outside close it.
  • Focus moves into the popover and back to the trigger when it closes.
  • The trigger has aria-expanded and aria-controls; the title names the popover.