Introducing Nuvyx UI v1.0.0

Docs
Reveal Card

Reveal Card

A dynamic card component with layered images and hover animations.

Hover on the card

Cover Image
Character
Title

Installation

Usage

import { RevealCard } from "@/components/ui/reveal-card";
export default function BasicUsage() {
  return (
    <RevealCard
      coverImage="/path/to/cover.jpg"
      titleImage="/path/to/title.png"
      characterImage="/path/to/character.png"
      width={266}
      height={400}
    />
  );
}
export function CustomizedCard() {
  return (
    <div className="flex flex-col items-center py-12">
      <div className="relative group">
        <div className="absolute -inset-1 bg-gradient-to-r from-purple-600 to-blue-400 rounded-lg blur opacity-25 group-hover:opacity-75 transition duration-1000 group-hover:duration-200"></div>
        <RevealCard
          coverImage="/path/to/cover.jpg"
          titleImage="/path/to/title.png"
          characterImage="/path/to/character.png"
          width={300}
          height={450}
          hoverRotation={30}
          titleTranslateY={-60}
          characterTranslateY={-40}
          characterTranslateZ={120}
          gradientColors={{
            top: "rgba(25,25,25,0.8)",
            bottom: "rgba(10,10,10,0.9)",
          }}
          animation={{
            duration: 600,
            delay: 100,
          }}
          alt={{
            cover: "Movie Poster",
            title: "Movie Logo",
            character: "Main Character",
          }}
          threshold={0.4}
          priority={true}
        />
      </div>
    </div>
  );
}

Props

Reveal Card

PropTypeDefaultDescription
coverImagestring""URL for the cover image.
titleImagestring""URL for the title image.
characterImagestring""URL for the character image.
widthnumber266Width of the card in pixels.
heightnumber400Height of the card in pixels.
hoverRotationnumber25Rotation angle on hover.
titleTranslateYnumber-50Y-axis translation for title image on hover.
characterTranslateYnumber-30Y-axis translation for character image on hover.
characterTranslateZnumber100Z-axis translation for character image on hover.
altobject{ cover: "Cover Image", title: "Title", character: "Character" }Alternate text for the images.
gradientColorsobject{ top: "rgba(12,13,19,1)", bottom: "rgba(12,13,19,1)" }Gradient overlay colors for the cover image.
animationobject{ duration: 500, delay: 0 }Animation duration and delay in milliseconds.
prioritybooleanfalseIf true, images are prioritized for loading (eager loading).
thresholdnumber0.3The threshold for triggering the animation (0-1).
classNamestring""Additional CSS classes for the card.