Description
@rc-component/trigger is a popup trigger and alignment primitive for React, part of the Ant Design ecosystem and maintained by the rc-component team. It is the low-level piece that decides when a popup opens and where it sits relative to the element that triggers it. You control its visibility with a set of actions, such as hover or click, and you can add delays for focus, mouse enter and mouse leave, or hide it on blur. Placement uses named presets, through builtinPlacements and popupPlacement, and alignment follows dom-align, so the popup stays positioned next to its trigger. It can align to the mouse position for click, hover and context menu actions, render an arrow, show a mask behind the popup with a click-to-close option, and destroy the popup DOM when hidden. Visibility can be controlled or uncontrolled, and a disabled state suppresses the popup without resetting its open state. The package ships TypeScript declarations with ES module and CommonJS outputs. The project also documents a local development site that you run with npm start. It is used by Ant Design and other React component libraries, and it is intended for component authors who need a dependable popup primitive rather than a finished tooltip.…
Highlights
- Popup visibility controlled by hover, click and other actions
- Placement presets and dom-align alignment
- Alignment to the mouse position for click, hover and context menu
- Masks, arrows, delays and controlled or uncontrolled visibility
- TypeScript declarations with ES module and CommonJS builds
Ratings & Reviews
No ratings yet
Be the first to rate @rc-component/trigger.
People also visit
@rc-component/trigger FAQ
What is it for?
It is a low-level popup trigger and alignment primitive for building tooltips, dropdowns and similar popups in React.
Who uses it?
The README says Ant Design and other React component libraries use it.
Does it include TypeScript types?
Yes. It ships TypeScript declarations with both ES module and CommonJS outputs.
How do I run the docs locally?
Install the dependencies with npm, then run npm start and open localhost port 8000.
Is it a finished tooltip?
No. It is a primitive for component authors, which you build on.
What are the best @rc-component/trigger alternatives?
Popular alternatives to @rc-component/trigger include react-popopo, react-popup and react-floater. See all @rc-component/trigger alternatives

















