Blossom UI

Hover card

Hover card component, a card with rich and interactive content that opens on hover or focus, with delays and automatic placement.

How to use it

Run npx @blossomui/react add hover-card, or copy src/components/UI/HoverCard/HoverCard.tsx into your React project and import it.

import { HoverCard } from './components/ui/HoverCard'

Props

HoverCardProps

PropTypeDescription
content (required)ReactNodeThe rich content of the card: an avatar, a bio, a button... Unlike a Tooltip it can be pointed at and used.
children (required)ReactNodeThe element that opens the card when it is hovered or focused.
placement'top' | 'bottom'Preferred side. It flips to the other one when there is no room.
openDelaynumberMilliseconds to wait before opening.
closeDelaynumberMilliseconds to wait before closing, so the pointer can travel from the trigger to the card.
widthnumberWidth of the card in pixels.
labelstringAccessible name of the card.
colorstringAccent color of the card: any CSS color. Without it the component uses `--blossom-accent`.
classNamestringClasses of the element that wraps the trigger. It is `inline-flex` by default.

Getting started

  • Introduction
  • Installation
  • Changelog

Customization

  • Colors
  • Brand color
  • Texts and translation

Components

  • Accordion
  • Alert dialog
  • Alerts
  • Avatar
  • Badges
  • Banner
  • Breadcrumb
  • Buttons
  • Calendar
  • Cards
  • Carousel
  • Charts
  • Chip input
  • Collapsible
  • Color picker
  • Combobox
  • Command palette
  • Context menu
  • Copy button
  • Date picker
  • Drawer
  • Dropdown
  • Empty state
  • File upload
  • Footer
  • Forms
  • Hover card
  • Jumbotron
  • KBD
  • Menubar
  • Modal
  • Navbar
  • Navigation menu
  • Number input
  • OTP input
  • Pagination
  • Popover
  • Pricing
  • Progress
  • Rating
  • Resizable panels
  • Scroll area
  • Segmented control
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Spinners
  • Stats
  • Stepper
  • Survey
  • Table
  • Tabs
  • Time picker
  • Timeline
  • Timer button
  • Toasts
  • Tooltip
  • Transfer list
  • Tree