A reusable UI component wrapping Mantine's popover for consistent overlay behavior. Use this to implement tooltips, menus, or contextual information panels.
// Source: https://github.com/BradGroux/veritas-kanban | License: MIT | Copyright 2026 Digital Meld
// Provided via justclaw.it.com; keep this notice with the code.
import * as React from 'react';
import { Popover as MantinePopover, type PopoverProps as MantinePopoverProps } from '@mantine/core';
import { cn } from '@/lib/utils';
type PopoverProps = Omit<MantinePopoverProps, 'opened' | 'defaultOpened' | 'onChange'> & {
open?: boolean;
defaultOpen?: boolean;
onOpenChange?: (open: boolean) => void;
};
function Popover({
open,
defaultOpen,
onOpenChange,
offset = 4,
radius = 'md',
shadow = 'md',
withinPortal = true,
...props
}: PopoverProps) {
return (
<MantinePopover
opened={open}
defaultOpened={defaultOpen}
onChange={onOpenChange}
offset
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key