Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Popover

Edit local filters in a compact anchored panel.

Preview

Live preview

Changes apply to this preview only.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Placement

Four sides, with an automatic flip when the preferred side has no room. offset controls the distance from the trigger.

Open preview

Padding

Enumerated from popoverVariantMap: none for an edge-to-edge list, sm to lg for panels with content.

Open preview

Width

matchWidth aligns the panel with the trigger instead of centring it; useful for a field and its suggestions.

Open preview

Usage

Use a titled panel for interactive content and apply changes through application-owned state.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluPopoverProps

Type source
PimoluPopoverProps public API
NameTypeDefaultDescription
contentRequiredReactNode—Content of the panel. It may contain interactive elements.
childrenRequiredReactElement<unknown, string | JSXElementConstructor<any>>—The single element that toggles the panel: any element, or a component that passes down the props it receives. It gets the ARIA state, the click handler and the ref, and the handlers it already had keep working.
placementPimoluPopoverPlacement | undefined"bottom"; the panel flips to the opposite side when there is not enough roomPreferred side. Defaults to "bottom"; the panel flips to the opposite side when there is not enough room.
offsetnumber | undefined8Distance between the trigger and the panel, in pixels. Defaults to 8.
matchWidthboolean | undefinedfalseMatch the trigger width when the panel sits above or below it. Useful for form panels; a menu usually keeps its natural width. Defaults to false.
openboolean | undefined—Controlled open state. Omit to let the component own it.
defaultOpenboolean | undefinedfalseInitial open state when uncontrolled. Defaults to false.
onOpenChange((open: boolean) => void) | undefined—Called whenever the component asks to open or close.
disabledboolean | undefinedfalseNever open. The trigger keeps its own disabled state.
closeOnSelectboolean | undefinedfalseClose when a click bubbles from inside the panel, after the clicked element has handled it. Handy for action lists. Defaults to false.
padding"sm" | "md" | "lg" | "none" | undefined"md"Padding inside the panel. Defaults to "md".
classNamestring | undefined—Class applied to the panel.
labelstring | undefined—Visible label associated with the control.
labelledBystring | undefined—Public Pimolu prop; see the source declaration for details.
contentRequired

ReactNode

No default extracted.

Content of the panel. It may contain interactive elements.

childrenRequired

ReactElement<unknown, string | JSXElementConstructor<any>>

No default extracted.

The single element that toggles the panel: any element, or a component that passes down the props it receives. It gets the ARIA state, the click handler and the ref, and the handlers it already had keep working.

placement

PimoluPopoverPlacement | undefined

Default: "bottom"; the panel flips to the opposite side when there is not enough room

Preferred side. Defaults to "bottom"; the panel flips to the opposite side when there is not enough room.

offset

number | undefined

Default: 8

Distance between the trigger and the panel, in pixels. Defaults to 8.

matchWidth

boolean | undefined

Default: false

Match the trigger width when the panel sits above or below it. Useful for form panels; a menu usually keeps its natural width. Defaults to false.

open

boolean | undefined

No default extracted.

Controlled open state. Omit to let the component own it.

defaultOpen

boolean | undefined

Default: false

Initial open state when uncontrolled. Defaults to false.

onOpenChange

((open: boolean) => void) | undefined

No default extracted.

Called whenever the component asks to open or close.

disabled

boolean | undefined

Default: false

Never open. The trigger keeps its own disabled state.

closeOnSelect

boolean | undefined

Default: false

Close when a click bubbles from inside the panel, after the clicked element has handled it. Handy for action lists. Defaults to false.

padding

"sm" | "md" | "lg" | "none" | undefined

Default: "md"

Padding inside the panel. Defaults to "md".

className

string | undefined

No default extracted.

Class applied to the panel.

label

string | undefined

No default extracted.

Visible label associated with the control.

labelledBy

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

Accessibility

  • Verify keyboard opening, Escape and focus return; avoid treating it as a tooltip.
Read the accessibility guide →