MDK Logo

Overlay

Popovers, tooltips, dropdowns, and overlay panels

Components for overlays and floating UI elements.

Prerequisites

  • Complete the installation

  • Add the dependency to your app's package.json
{
  "dependencies": {
    "@tetherto/mdk-react-devkit": "*",
    "@tetherto/mdk-react-adapter": "*",
    "@tetherto/mdk-ui-foundation": "*"
  }
}

Run npm install from the mdk/ui workspace root after your app is under apps/ so npm links workspace packages.

  • Import styles: import '@tetherto/mdk-react-devkit/styles.css'

Components

@tetherto/mdk-react-devkit

Import the public APIs on this page from @tetherto/mdk-react-devkit.

Popover

Popover Root - Container for a single popover

agent-ready

Source

https://github.com/tetherto/mdk/blob/main/ui/packages/react-devkit/src/primitives/components/popover/USAGE.md#popover-root-props-detail

SimplePopover

One-line convenience wrapper that pairs a trigger with floating content — no provider boilerplate

agent-ready

Source

https://github.com/tetherto/mdk/blob/main/ui/packages/react-devkit/src/primitives/components/popover/USAGE.md#popover-root-props-detail

Props

PropStatusType / OptionsDefaultDescription
contentRequiredReact.ReactNode-Popover content
triggerRequiredReact.ReactNode-Element that triggers the popover
alignOptional"center" | "start" | "end""center"Alignment of the popover
classNameOptionalstring-Additional class for content
onOpenChangeOptional((open: boolean) => void)-Callback when open state changes
openOptionalboolean-Controlled open state
showArrowOptionalbooleanfalseWhether to show the arrow
showCloseOptionalbooleanfalseWhether to show a close button
sideOptional"left" | "right" | "top" | "bottom""bottom"Position of the popover relative to trigger
sideOffsetOptionalnumber8Distance from the trigger in pixels

SimpleTooltip

One-line convenience wrapper around the full <Tooltip> primitive set. Pass content (the hover text) and any single React element as children — <SimpleTooltip> handles the provider, trigger, portal and content for you. Prefer this over composing <Tooltip> + <TooltipTrigger> + <TooltipContent> unless you need custom positioning or async content

agent-ready

Source

https://github.com/tetherto/mdk/blob/main/ui/packages/react-devkit/src/primitives/components/tooltip/index.tsx

Props

PropStatusType / OptionsDefaultDescription
childrenRequiredReact.ReactNode-Element that triggers the tooltip
contentRequiredReact.ReactNode-Tooltip content (string or JSX)
classNameOptionalstring-Additional class for content
delayDurationOptionalnumber200Delay before showing tooltip (ms)
showArrowOptionalbooleantrueWhether to show the arrow
sideOptional"left" | "right" | "top" | "bottom""top"Position of the tooltip relative to trigger
sideOffsetOptionalnumber8Distance from the trigger in pixels

Tooltip

Tooltip Root - Container for a single tooltip

agent-ready

Source

https://github.com/tetherto/mdk/blob/main/ui/packages/react-devkit/src/primitives/components/tooltip/index.tsx

On this page