Hover Card
An enterprise-level hover card component based on BrConfigProvider for global theme configuration. It supports adaptive positioning, lazy rendering, and keyboard navigation, and can be seamlessly integrated with components like BrTable and BrList.
Component Features
- 🎯 Adaptive Positioning: Intelligent space calculation, supports auto-avoidance and multi-direction (top/bottom/left/right) popups.
- ⚡ Seamless Integration: Perfectly integrates with components like
BrTable,BrList, andBrAvatarto handle complex interactions. - 🎨 Theme Customization: Supports global customization based on
BrConfigProviderand local style overrides via TailwindCSS. - ⌨️ Accessibility: Built-in keyboard navigation (Tab switching, ESC to close) and delay control to avoid accidental touches.
- 📦 Multi-instance Management: Comes with
HoverCardManagerto provide automatic z-index incrementation for global layering.
Basic Usage
The most basic hover card, displayed when the mouse hovers over the trigger element.
Integration with Avatar
Commonly used for displaying user information, hovering over the avatar to show detailed user profiles.
Integration with Table
Display more extended information or operation forms when hovering over a table row.
Theme Customization
Supports using BrConfigProvider for global configuration of the HoverCard, or using TailwindCSS for local style isolation and customization.
API Reference
BrHoverCard
BrHoverCardTrigger
A wrapper that contains the trigger element. By default, it uses asChild.
BrHoverCardContent
HoverCardManager
A static management class used to manage the global state and layering of hover cards.