npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-image-hovercard

v0.2.3

Published

A card with a hover effect on the image element.

Downloads

656

Readme

react-image-hovercard

A customizable React component that displays a card with a hover effect on the image, providing an immersive experience with tilt animations.

Features

  • Customizable Dimensions and Styles: Adjust the width, height, padding, border properties, and border radius of the card.
  • Dynamic Scaling: Set the start and end scale values for a smooth scaling effect on hover.
  • Image Customization: Specify the image content, width, and height.
  • Customizable Content: Add a title, description, and random text to the card.
  • Button Customization: Customize the button text, color, background color, size, and border radius.
  • Immersive Tilt Effect: The image tilts in response to mouse movements, enhancing the user experience.
  • Two Buttons: Supports two customizable buttons with individual click handlers.
  • Subtitle: Optionally display a subtitle with customizable text.
  • Customizable Styles: Configure the card's width, height, padding, borders, background colors, and box shadow.
  • Tilt Effect: The component includes a tilt effect on hover, which will be customizable in future versions.
  • Hover Scaling: Scale the card on hover with customizable start and end scales.

Installation

Install my-project with npm

  npm i react-image-hovercard

Output

366832943-3fe1688b-0c14-48df-8df7-93e26242e4cb-ezgif com-video-to-gif-converter (1)

Usage/Examples

import React from 'react';
import { HovCardV2 } from './components/HovCardV2';

const App = () => {
  return (
    <div>
      <HovCardV2
        cardWidth="400px"
        cardHeight="auto"
        cardPadding="10px"
        cardBorderWidth="3px"
        cardBorderColor="#333"
        cardBorderStyle="solid"
        cardBorderRadius="8px"
        cardEndScale="1.2"
        cardStartScale="1.0"
        cardImgContent="https://i.ibb.co/XbMzrd9/monster.png"
        cardImgWidth="250px"
        cardImgHeight="200px"
        cardTitle="Monster Card"
        cardTitleFontSize="28px"
        cardDescpriptionFontFamily="Arial"
        cardDescpription="This is a customizable hover card with two buttons."
        cardRandomText="Extra text here."
        cardBtnName1="First Button"
        cardBtnName2="Second Button"
        cardBtnColor1="white"
        cardBtnColor2="white"
        cardBtnBackgroundColor1="green"
        cardBtnBackgroundColor2="blue"
        cardBtnSize1="16px"
        cardBtnSize2="16px"
        cardBtnBorderRadius1="5px"
        cardBtnBorderRadius2="5px"
        onCustomClick1={() => alert('First button clicked!')}
        onCustomClick2={() => alert('Second button clicked!')}
        cardSubtitle="Optional Subtitle"
        cardSubtitleEnable={true}
        cardButton2Enabled={true}
        cardBackgroundColor="#f4f4f4"
        cardBackgroundBodyColor="#ffffff"
        cardDescpriptionFontSize="14px"
        cardSubtitleFontSize="18px"
        cardBoxShadow="0px 10px 15px rgba(0,0,0,0.3)"
        cardBtnHeight1="28px"
        cardBtnWidth1="100px"
        isHoverEnabled="true"
      />

      <HovCardH2
        cardWidth="400px"
        cardHeight="auto"
        cardPadding="10px"
        cardBorderWidth="3px"
        cardBorderColor="#333"
        cardBorderStyle="solid"
        cardBorderRadius="8px"
        cardEndScale="1.2"
        cardStartScale="1.0"
        cardImgContent="https://i.ibb.co/XbMzrd9/monster.png"
        cardImgWidth="250px"
        cardImgHeight="200px"
        cardTitle="Monster Card"
        cardTitleFontSize="28px"
        cardDescpriptionFontFamily="Arial"
        cardDescpription="This is a customizable hover card with two buttons."
        cardRandomText="Extra text here."
        cardBtnName1="First Button"
        cardBtnName2="Second Button"
        cardBtnColor1="white"
        cardBtnColor2="white"
        cardBtnBackgroundColor1="green"
        cardBtnBackgroundColor2="blue"
        cardBtnSize1="16px"
        cardBtnSize2="16px"
        cardBtnBorderRadius1="5px"
        cardBtnBorderRadius2="5px"
        onCustomClick1={() => alert('First button clicked!')}
        onCustomClick2={() => alert('Second button clicked!')}
        cardSubtitle="Optional Subtitle"
        cardSubtitleEnable={true}
        cardButton2Enabled={true}
        cardBackgroundColor="#f4f4f4"
        cardBackgroundBodyColor="#ffffff"
        cardDescpriptionFontSize="14px"
        cardSubtitleFontSize="18px"
        cardBoxShadow="0px 10px 15px rgba(0,0,0,0.3)"
        cardBtnHeight1="28px"
        cardBtnWidth1="100px"
        isHoverEnabled="false"
      />
    </div>
  );
};

export default App;

Props

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | cardWidth | string | Width of the card. | | cardHeight | string | Height of the card. | | cardPadding | string | Padding inside the card. | | link | string | URL the button links to.| | cardBtnName | string | Text displayed on the button. |

property mentioned in code

License

MIT

Author