A set of components for creating interactive 3D card effects with hover animations.

You can customize the 3D Card Effect by:
multiplierX and multiplierY props on CardContainertranslateZ and boxShadow props on CardItem
CardItem componentThe CardContainer component wraps all CardItem components and manages the 3D effect behavior.
| Prop | Type | Default | Description |
|---|---|---|---|
multiplierX | Number | 20 | Multiplier for the X-axis rotation effect. |
multiplierY | Number | 10 | Multiplier for the Y-axis rotation effect. |
The CardItem component represents an individual element within the 3D card that can have its own depth effect.
| Prop | Type | Default | Description |
|---|---|---|---|
translateZ | Number | 30 | The Z-axis translation distance in pixels when hovered. |
boxShadow | Boolean | false | Whether to apply a box shadow effect when hovered. |
Both CardContainer and CardItem use the default slot for their content.
| Slot | Description |
|---|---|
default | Content for the card container or card item. |
CardItem components within a CardContainer.multiplierX and multiplierY props on CardContainer to control the intensity of the 3D effect.translateZ values for CardItem components to create a sense of depth.boxShadow on some CardItem components for varied visual effects.CardItem components for complex layouts.While these components create visually appealing effects, ensure that the content remains accessible to all users, including those using screen readers or keyboard navigation.
The CardContainer component handles the mouse movement tracking and applies the 3D rotation effect. It also provides the hover state context to its child components.
Key features:
provide APIThe CardItem component represents individual elements within the 3D card that can have their own depth effect.
Key features:
translateZ propinject API to respond to the parent's hover stateFor the full implementation details, please refer to the source code of each component.