2.1.3 • Published 2 months ago

special-card v2.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

Special Card

Elegant React components for displaying cards with dynamic and interactive visual effects.Build Status npm version npm downloads license

Special Card Holo Special Card Pop

Description

The special-card library offers a unique visual touch to your React.js projects. With its HoloCard and PopCard components, create stylized interactive cards that are sure to engage your users.

Installation

To install the latest version:

npm install special-card

Usage

Import and use the components in your project:

import { HoloCard, PopCard } from 'special-card';

function App() {
  return (
    <div style={{ display: 'flex' }}>
      <PopCard 
        height={300}
        titleImage="/path/to/title.png"
        hoverImage="/path/to/hover.png"
        backgroundImage="/path/to/background.png"
        link="https://your-link.com"
      />
      <HoloCard
        height={300}
        width={300}
        radius={30}
        imageSrc="/path/to/image.png"
        imageShineSrc="/path/to/shine-image.png"
      />
    </div>
  );
}

export default App;

Documentation

HoloCard

PropTypeDescriptionDefault
imageSrcstringPath to the card imageRequired
imageShineSrcstringPath to the shine effect imageRequired
widthnumberWidth of the cardRequired
heightnumberHeight of the cardRequired
hypnumberIntensity of the holographic effect0.8
onumberOpacity of the shine effect0.4
radiusnumberRadius of the card corners16

PopCard

PropTypeDescriptionDefault
backgroundImagestringPath to the background image/bg.png
titleImagestringPath to the title image/title.png
hoverImagestringPath to the hover image/hover.png
linkstringURL link on card clickhttps://brev.al
heightnumberHeight of the card300
widthnumberWidth of the cardheight / 1.5

Complete Example

Below is an example of how to integrate the library:

// index.js
import React from 'react';
import { render } from "react-dom";
import { HoloCard, PopCard } from "special-card";

const App = () => (
  <div style={{ display: "flex", justifyContent: "center", alignItems: "center" }}>
    <PopCard 
      height={300} 
      titleImage="/path/to/title.png"
      hoverImage="/path/to/hover.png"
      backgroundImage="/path/to/background.png"
      link="https://your-link.com"
    />
    <HoloCard
      height={300}
      width={300}
      radius={30}
      imageSrc="/path/to/image.png"
      imageShineSrc="/path/to/shine-image.png"
    />
  </div>
);

render(<App />, document.getElementById("root"));

Contributing

Contributions are always welcome. Please clone the repository and submit your pull requests here:

git clone https://github.com/LightInn/special-card.git

License

Distributed under the MIT License. See LICENSE for more information.


2.1.3

2 months ago

2.1.2

2 months ago

2.1.1

5 months ago

2.1.0

5 months ago

2.0.2

6 months ago

2.0.1

6 months ago

2.0.0

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago