Preview
See the component in action with different configurations
Basic Usage
Sample Card
NewThis is a sample interactive card with hover effects
With Custom Content
Advanced Card
PremiumThis card has custom content and styling
Custom content can be added here with buttons, images, or any other elements.
Without Hover Effect
Static Card
StaticThis card doesn't have hover effects
Implementation
Copy the code and use it in your project
Basic Usage
import { InteractiveCard } from "@/components/custom/interactive-card";
export default function Example() {
return (
<InteractiveCard
title="Sample Card"
description="This is a sample interactive card"
badge="New"
actionText="Learn More"
onAction={() => console.log("Action clicked")}
/>
);
}API Reference
All available props and their types
titlestringRequired
The card title
descriptionstringRequired
The card description
badgestring
Optional badge text
badgeVariantstring
Badge variant style
childrenReactNode
Custom content
classNamestring
Additional CSS classes
hoverEffectboolean
Enable hover effects (default: true)
actionTextstring
Action button text
onActionfunction
Action button click handler