Docs
3D Visual Card

3D Visual Card

Displays a beautiful 3D Visual Card.

3D Header
Hover me!
3D Effect
3D Footer

Installation

Copy and paste the cn util code into your project.

import { ClassValue, clsx } from "clsx"
import { twMerge } from "tailwind-merge"
 
 
export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs))
}

Copy and paste the Event Calendar code into your project.

API Reference

Props

PropTypeDescriptionDefault
widthstringContainer width"300px"
heightstringContainer height"500px"
headerReactNodeHeader content"This is Header"
footerReactNodeFooter content"This is Footer"
childrenReactNode[]Content for the boxes["Lorem Lorem", "Lorem Lorem"]
classNamestringAdditional CSS classes""
hoverColorstringHover color (CSS color value)"rgba(0, 0, 255, 0.2)"
sideHeightstringSide height for 3D effect"16px"
boxShadowstringBox shadow for hover effect"1px 1px 10px rgba(0, 0, 0, 0.1)"
transformDurationstringTransform duration for animations"0.3s"

Implementation Notes

  1. The component uses a combination of Tailwind CSS classes and custom CSS for the 3D effects
  2. CSS variables are used to customize the 3D effect properties
  3. The component is fully responsive and customizable through props
  4. Styled JSX is used for the 3D-specific CSS that can't be easily achieved with Tailwind alone

Usage Example

export default function Demo() {
  return (
    <div className="flex gap-4">
      {/* 3D container with custom settings */}
      <VisualContainer 
        width="400px"
        height="550px"
        hoverColor="rgba(75, 85, 99, 0.3)"
        sideHeight="20px"
        transformDuration="0.5s"
        header={<h2 className="font-bold">Interactive 3D Container</h2>}
        footer={<p className="text-sm">Hover over elements to see 3D effect</p>}
        children={[
          <div key="1" className="flex items-center justify-center h-full">Box 1</div>,
          <div key="2" className="flex items-center justify-center h-full">Box 2</div>
        ]}
      />
    </div>
  );
}