百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

react-awesome-popover

> 前端框架
开源

一个带有动画支持的智能 popover 组件,适用于 ReactJS

194 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

一个带有动画支持的智能 popover 组件,适用于 ReactJS

Starting with v5.0.0, this component is no longer based on Popper.js, which used react-popper. to use react-popper based popover you must use version 4.1.0

React-awesome-popover

Installation


via NPM

code
npm i react-awesome-popover

via CDN (unpkg)

code
https://unpkg.com/react-awesome-popover@latest/build/index.umd.js

UMD library exposed as ReactAwesomePopover

javascript
const Popover = ReactAwesomePopover;

Example

javascript
ReactDOM.render(
  
    The Target
    

  ,
  document.body
);

The component supports server-side rendering

You can also use nested popovers

javascript
ReactDOM.render(
  
    The Target
    

          
          ...
        
      
      ...
    
  ,
  document.body
);

Performing an animation

javascript

  Click
  
    {style => {
      return (
        

      );
    }}
  

You can also use as a tooltip.

Very simple!.

javascript

  The Target
  

    
    aperiam, corporis, quo libero sapiente recusandae! Distinctio deserunt dolor
    sequi, i
  

Props

Prop Type Description Default
arrow Boolean If false, the arrow is removed true
placement String The placement of the popover.top-start,top-center,top-end,left-start,left-center,left-end,right-start,right-center,right-end,bottom-start,bottom-center,bottom-end auto
action String click or hover. Supports touch event click
onOpen Function The callback is called when the content is mounted
onClose Function The callback is called after the content is unmounted from the dom
open Boolean Whether the popover is visible. Passing this prop puts the popover in controlled mode. To make the popover completely manageable, you must pass the null value to the action prop false
zIndex Number Initial number for zIndex 1000
overlayColor String Set the background color of an overlay element rgba(0,0,0,0.5)
arrowPropss Object Pass any prop to the div element that wraps the arrow {}
preventDefault Boolean Cancels the event if it is cancelable, meaning that the default action that belongs to the event will not occur.more false
stopPropagation Boolean Stops the bubbling of an event to parent elements, preventing any parent event handlers from being executed. more false

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptanimationpopoverpopperreact

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架