components/popover.tsx

themes · packages/radix-ui-themes/src/components/popover.tsx · typescript · MIT
ui

Accessible popover component with root, trigger, content, and close actions

// Source: https://github.com/radix-ui/themes | License: MIT | Copyright 2023 WorkOS
// Provided via justclaw.it.com; keep this notice with the code.
import * as React from 'react';
import classNames from 'classnames';
import { Popover as PopoverPrimitive } from 'radix-ui';

import { extractProps } from '../helpers/extract-props.js';
import { requireReactElement } from '../helpers/require-react-element.js';
import { popoverContentPropDefs } from './popover.props.js';
import { Theme } from './theme.js';

import type { PopoverContentOwnProps } from './popover.props.js';
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';

interface PopoverRootProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {}
const PopoverRoot: React.FC<Popover

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key