Hover Card
For sighted users to preview content available behind a link.
Usage
HoverCard
component takes intrigger
prop.trigger
prop is the component that triggers the hover card to open. It is required. It can be anyReact Component
or even a simplestring
.Children
ofHoverCard
component are rendered as the hover card.
Interface for HoverCardProps
interface HoverCardProps {
trigger: React.ReactNode;
children: React.ReactNode;
className?: string;
}
Customizable Design
More granular components provide you with more control over the design of the HoverCard
component. You can customize the design of the HoverCard
component by using the following sub-components:
- Style of every sub-component of the HoverCard component can be customized using the
className
prop. - Pass in a
CSS class
or useTailwind CSS
utility classes to style the HoverCard component.