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.
Live preview
Adjust the controls on the right; the preview and code update in real time.
Payroll cutoff
Positioned by Popper with collision handling, optional arrow, and semantic tokens.
example.tsxtsx
import { Popper, PopperTrigger, PopperContent } from '@mihcm/ui/Popper';
import { Button } from '@mihcm/ui/Button';
export function Example() {
return (
<Popper
placement="bottom-start"
strategy="absolute"
offset={[0, 8]}
arrow
flip
preventOverflow
>
<PopperTrigger>
<Button variant="outline">Open positioned panel</Button>
</PopperTrigger>
<PopperContent size="md">
<div className="space-y-2">
<p className="text-sm font-medium">Payroll cutoff</p>
<p className="text-sm text-muted-foreground">
Positioned by Popper with collision handling, optional arrow, and semantic tokens.
</p>
</div>
</PopperContent>
</Popper>
);
}Install
Both paths are valid. CLI ships the source into your repo (you own it). Install pins via npm.
npx @mihcm/cli add PopperCopies the source into
components/ds/Popper.tsx. You own the file. Use --out to override the directory or --force to overwrite.