MantleUI

Card3D

A card with 3D perspective tilt that follows the mouse cursor. Pure CSS/JS — does not require Three.js. Includes an optional glare overlay effect.

Basic

Hover over the cards to see the 3D tilt and glare effect.

import { Card3D } from "@mantleui/react/three";
<Card3D maxTilt={15} glare>
<div style={{ width: 280, padding: 16 }}>
<h3>Component Library</h3>
<p>73 production-grade components.</p>
</div>
</Card3D>
// Custom colors
<Card3D
borderColor="#8b5cf640"
background="rgba(139, 92, 246, 0.05)"
>
<div>Purple tinted card</div>
</Card3D>
// Stronger tilt
<Card3D maxTilt={25}>
<div>More dramatic tilt effect</div>
</Card3D>

No Glare

Subtle tilt without the glare overlay — great for minimal designs.

// No glare, subtle tilt
<Card3D
glare={false}
maxTilt={8}
borderColor="#3b82f640"
background="rgba(59, 130, 246, 0.04)"
>
<div>
<h3>Pro Plan</h3>
<p>$19/month</p>
<ul>
<li>Unlimited projects</li>
<li>Priority support</li>
</ul>
</div>
</Card3D>

FlipCard

A card that flips on click to reveal a back side. Supports horizontal and vertical flip directions.

Click to Flip

Click on any card to see the flip animation.

import { FlipCard } from "@mantleui/react/three";
// Basic horizontal flip
<FlipCard
width={300}
height={220}
frontBackground="#18181b"
backBackground="#18181b"
borderColor="#27272a"
front={
<div style={{ padding: 24, textAlign: "center" }}>
<h3>Front Side</h3>
<p>Click to flip</p>
</div>
}
back={
<div style={{ padding: 24, textAlign: "center" }}>
<p>Back side content here</p>
</div>
}
/>
// Gradient backgrounds
<FlipCard
frontBackground="linear-gradient(135deg, #0ea5e9, #7c3aed)"
backBackground="linear-gradient(135deg, #7c3aed, #f43f5e)"
borderColor="transparent"
front={<div>Front</div>}
back={<div>Back</div>}
/>
// Vertical flip
<FlipCard
direction="vertical"
front={<div>Flips top to bottom</div>}
back={<div>Back content</div>}
/>
// Controlled
const [flipped, setFlipped] = useState(false);
<FlipCard
flipped={flipped}
onFlippedChange={setFlipped}
front={<div>Controlled front</div>}
back={<div>Controlled back</div>}
/>

Props

children
ReactNode

Card content.

maxTilt15
number

Max tilt angle in degrees.

perspective1000
number

CSS perspective distance in pixels.

resetSpeed400
number

Transition speed (ms) when mouse leaves.

hoverScale1.02
number

Scale factor on hover.

glaretrue
boolean

Enable glare overlay effect.

maxGlare0.15
number

Maximum glare opacity (0-1).

borderColor"var(--mantle-color-border)"
string

Border color.

background"var(--mantle-color-bg-subtle)"
string

Background color.

borderRadius12
string | number

Border radius in pixels or CSS value.

© 2026 MantleUI. All rights reserved.