@gfazioli/mantine-reflection
v2.3.13
Published
Mantine Reflection is a React component that allows you to create a reflection effect on an image or any other component.
Downloads
411
Maintainers
Readme
Mantine Reflection Component
❤️ If this component has been useful to you or your team, please consider becoming a sponsor
Overview
This component is created on top of the Mantine library.
Mantine Reflection provides a simple wrapper—Reflection—that adds a mirrored version of its children, enabling polished visual effects for images and components within Mantine‑based interfaces. Developers can tune reflection characteristics including distance from the source, opacity, blur level, stretch, and gradient start/end to achieve subtle or pronounced looks. It also includes comprehensive shadow controls (offset, opacity, blur, size, scale X/Y, and color) to complement the reflection for more realistic depth.
The package ships global styles via styles.css and a layer‑scoped variant via styles.layer.css for integration with CSS @layer mantine-reflection. When reflecting images, setting display: block on img prevents baseline padding artifacts. A dedicated reflectionBlur prop adds pixel‑based blur to the reflection, with guidance to use small values or padding to avoid edge clipping. Overall, the component is designed to be drop‑in, flexible, and precise for creating refined mirror and shadow effects around arbitrary React children.
[!note]
→ Demo and Documentation → Youtube Video → More Mantine Components
Installation
npm install @gfazioli/mantine-reflectionor
yarn add @gfazioli/mantine-reflectionAfter installation import package styles at the root of your application:
import '@gfazioli/mantine-reflection/styles.css';Usage
import { Reflection } from '@gfazioli/mantine-reflection';
function Demo() {
return (
<Reflection>
<img
width={150}
style={{ display: 'block', borderRadius: '50%' }}
alt="test"
src="https://source.unsplash.com/9QmbsTDAI4g/150x150"
/>
</Reflection>
);
}Sponsor
❤️ If this component has been useful to you or your team, please consider becoming a sponsor
Your support helps me:
- Keep the project actively maintained with timely bug fixes and security updates
- Add new features, improve performance, and refine the developer experience
- Expand test coverage and documentation for smoother adoption
- Ensure long‑term sustainability without relying on ad hoc free time
- Prioritize community requests and roadmap items that matter most
Open source thrives when those who benefit can give back—even a small monthly contribution makes a real difference. Sponsorships help cover maintenance time, infrastructure, and the countless invisible tasks that keep a project healthy.
Your help truly matters.
💚 Become a sponsor today and help me keep this project reliable, up‑to‑date, and growing for everyone.
