3D Card
Add 3D effects to your cards
Use the Card3D
component to add depth with a 3D effect to your cards, and create more engaging user experience. They can create a modern, polished look and enhanced visual for your call to actions:
Hover on me for 3D animation.
Card
component prop with the Card3D
component. Effect Intensity
You can increase the intensity of the 3D effect using the rotateDegree
prop. By default, the card is rotated by 15° on hover. Specify the rotateDegree
prop to change the intensity of the effect:
Rotation degree set to 45°
Configuring Glow
When the card is hovered, a glow effect will follow the cursor. This can be turned off by setting the glow
prop to false
, or its size can be modified by setting the glowSize
prop:
Glow turned off
Glow set to 75px
Glow Colors
The colors of the glow can also be configured using the startColor
and stopColor
props. Note that you want to set the colors to semi transparent using the alpha channel (eg using RGBA colors), otherwise the effect will mask the underlying content:
Glow without semi-transparent colors
API
Card
component for the CardProps
type. Prop | Default | Purpose |
---|---|---|
rotateDegree | 15 | Sets the rotation amount on hover. |
glow | true | Shows a glow effect on hover. |
glowSize | - | Sets the radious of the glow. |
startColor | rgba(255, 255, 255, .10) | Sets the starting (inner) color of the glow. |
stopColor | rgba(0, 0, 0, 0) | Sets the ending (outer) color of the glow. |
Request improvement for this page