Skip to main content
Version: 1.0.3

Image Card

Overview

ImageCard is a highly customizable card component built for modern UI use-cases. It supports multiple layouts, media positioning, hover animations, and rich visual variants.

Nature

Explore Pets

A flexible image card component designed for modern interfaces. Supports multiple layouts, media positions, and interactive actions.


Different Positions for Below Layout

The below layout supports placing the image on the top, left, or right side of the content.

Explore Pets

A flexible image card component designed for modern interfaces. Supports multiple layouts, media positions, and interactive actions.


Media Card

Live From Space

Live From Space

Mac Miller


Installation

ignix add component imageCard

Basic Usage

import { ImageCard } from "@ignix-ui/imagecard";
import { Star } from "lucide-react";

function App() {
return (
<ImageCard
image="https://picsum.photos/id/237/800/600"
title="Explore Pets"
description="A flexible image card component designed for modern interfaces.
Supports multiple layouts, media positions, and interactive actions."
category="Nature"
variant="default"
layout="overlay"
size="md"
button={[
{
label: "Documentation",
href: "/docs",
},
{
label: "Source Code",
href: "https://github.com",
},
{
href: "https://github.com",
icon: Star,
ariaLabel: "Star repository",
},
]}
/>
);
}

export default App;

Props

PropTypeDefaultDescription
titlestringRequired. Title text displayed on the card
imagestringImage URL for the card
descriptionstringSupporting description text
layout"overlay" | "below""overlay"Controls how content is placed relative to the image
mode"card" | "image" | "media""card"Enables media-style layout behavior
mediaPosition"top" | "left" | "right""top"Position of the image in below and media layouts
variant"default" | "dark" | "light" | "green" | "purple" | "red" | "orange" | "pink" | "elegant" | "vibrant" | "ocean" | "sunset" | "forest" | "minimal" | "royal""red"Visual variant for category Icon & hover
size"sm" | "md" | "lg" | "xl""md"Controls spacing and typography scale
categorystringOptional category badge label
categoryIconReactNodeIcon displayed inside the category badge
buttonstring | CardLink | CardLink[]Action button(s) rendered at the bottom
onAction() => voidCallback fired when default button is clicked
errorbooleanfalseDisplays error state when image fails to load
classNamestringCustom class overrides

Used when passing custom buttons via the button prop.

interface CardLink {
label?: string
href?: string
icon?: ComponentType<LucideProps>
ariaLabel?: string
onClick?: () => void
}