MiHCM
overlay/@mihcm/ui·v0.21.0·stable

Popper

Low-level Popper.js v2 positioning primitive for custom floating panels, virtual anchors, arrows, portals, and modifiers.

Props

The full prop API for Popper. Same surface in web and React Native — bundlers pick the right variant via the react-native export condition.

PropTypeDefaultDescriptionSince
openbooleanControlled open state.0.9.0
defaultOpenbooleanfalseInitial uncontrolled open state.0.9.0
onOpenChange(open: boolean) => voidCalled when outside pointer, Escape, or trigger interaction requests a state change.0.9.0
placementPlacement'bottom-start'Popper v2 placement: auto, top, right, bottom, left, and start/end variants.0.9.0
strategy'absolute' | 'fixed''absolute'Positioning strategy used by Popper.0.9.0
offset[number, number][0, 8]Skid and distance offset passed to the Popper offset modifier.0.9.0
flipbooleantrueEnables Popper flip behavior when the preferred side overflows.0.9.0
preventOverflowbooleantrueKeeps the panel inside visible clipping boundaries.0.9.0
arrowbooleanfalseAdds and wires PopperArrow to the arrow modifier.0.9.0
matchReferenceWidthbooleanfalseSets the popper width to match the trigger/reference width.0.9.0
modifiersReadonlyArray<PopperModifier>Custom Popper modifiers appended after built-in modifiers.0.9.0
referenceElementElement | VirtualElement | nullExternal or virtual reference. Use for context menus, canvas anchors, and cursor-based panels.0.9.0
portalledbooleantrueRenders PopperContent into document.body.0.9.0
hideWhenReferenceHiddenbooleantrueHides content when the reference is clipped or out of view. On PopperContent.0.9.0
size'sm' | 'md' | 'lg' | 'auto''md'Content width preset. On PopperContent.0.9.0

Import

import { Popper, PopperTrigger, PopperContent } from '@mihcm/ui/Popper';