Popover (Base UI)
iconiq-ui/b-popoverFreeComponent
Popover with the same Iconiq API layered over Base UI popover primitives, preserving side-aware panel motion, optional anchor support, and size-aware content transitions.
Live preview
live · rendered by the registry
Rendered by Iconiq UI on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.iconiqui.com/r/b-popover.jsonSource
1"use client";23import { Popover as PopoverPrimitive } from "@base-ui/react/popover";4import { motion } from "motion/react";5import * as React from "react";67import { cn } from "@/lib/utils";89const controlCornerClassName =10 "rounded-lg supports-[corner-shape:squircle]:corner-squircle supports-[corner-shape:squircle]:rounded-[11px]";1112const surfaceCornerClassName =13 "rounded-lg supports-[corner-shape:squircle]:corner-squircle supports-[corner-shape:squircle]:rounded-[12px]";1415const popoverThemeClassName =16 "[--po-surface:#ffffff] [--po-foreground:#111111] [--po-border:#e3e7ec] [--po-ring:rgba(17,17,17,0.16)] dark:[--po-surface:#111111] dark:[--po-foreground:#f6f3ec] dark:[--po-border:#2b2a25] dark:[--po-ring:rgba(246,243,236,0.18)]";1718const popoverPanelClassName = cn(19 surfaceCornerClassName,20 "z-50 w-72 transform-gpu border border-[color:var(--po-border)] bg-[color:var(--po-surface)] p-4 text-[color:var(--po-foreground)] shadow-none outline-none"21);2223const popoverTriggerClassName = cn(24 controlCornerClassName,25 "inline-flex min-h-11 min-w-11 touch-manipulation items-center justify-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:color-mix(in_oklch,var(--po-ring),transparent_50%)] focus-visible:ring-offset-2 focus-visible:ring-offset-[color:var(--po-surface)]"26);2728type Side = "top" | "right" | "bottom" | "left";29type Align = "start" | "center" | "end";30type CollisionPadding = React.ComponentPropsWithoutRef<31 typeof PopoverPrimitive.Positioner32>["collisionPadding"];3334type PopoverContextValue = {35 actionsRef: React.RefObject<PopoverPrimitive.Root.Actions | null>;36 open: boolean;37 contentId: string;38 triggerId: string;39 getAnchorNode: () => HTMLElement | null;40 setAnchorNode: (node: HTMLElement | null) => void;41 setTriggerNode: (node: HTMLElement | null) => void;42};4344type PopoverTriggerElementProps = React.HTMLAttributes<HTMLElement> & {45 className?: string;46};4748type PopoverTriggerChildElement = React.ReactElement<49 PopoverTriggerElementProps & React.RefAttributes<HTMLElement>50>;5152type PopoverAnchorElementProps = React.HTMLAttributes<HTMLElement> & {53 className?: string;54};5556type PopoverAnchorChildElement = React.ReactElement<57 PopoverAnchorElementProps & React.RefAttributes<HTMLElement>58>;5960type PopupRenderProps = React.HTMLAttributes<HTMLDivElement> & {61 children?: React.ReactNode;62 className?: string;63 ref?: React.Ref<HTMLDivElement>;64 style?: React.CSSProperties;65};6667// … truncated
What it pulls in
npm packages
Files it writes
More from Iconiq UI
All 119 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | Iconiq UI | Components | Free | 2 deps | |
| AI Inputai-input | Iconiq UI | Components | Free | 3 deps | |
| Alertalert | Iconiq UI | Components | Free | 2 deps | |
| Avataravatar | Iconiq UI | Components | Free | 3 deps | |
| Accordion (Base UI)b-accordion | Iconiq UI | Components | Free | 2 deps | |
| Alert Dialog (Base UI)b-alert-dialog | Iconiq UI | Components | Free | 3 deps | |
| Autocomplete (Base UI)b-autocomplete | Iconiq UI | Components | Free | 3 deps | |
| Avatar (Base UI)b-avatar | Iconiq UI | Components | Free | 2 deps |
