@gfazioli/mantine-reflection
A Mantine component that adds a reflection effect to its children.
Installation
After installation import package styles at the root of your application:
You can import styles within a layer @layer mantine-reflection by importing @gfazioli/mantine-reflection/styles.layer.css file.
Usage
The Reflection component simply wraps the content to be reflected.

Reflection Blur: The
reflectionBlurprop adds a blur effect to the reflection. The blur is automatically padded to prevent edge clipping — no manual padding needed.
The Image tag
The img tag requires to be in display: block in order to avoid padding below it. For this reason, a style has been added to force the behavior.


Responsive props
Several props support responsive values using Mantine breakpoint objects — the same pattern used by Mantine core components like SimpleGrid. Under the hood, CSS media queries are generated via InlineStyles, so there are no React re-renders on resize.
The following props accept responsive breakpoint objects:
| Prop | Description |
|---|---|
reflectionDistance | Distance between the original element and the reflection |
reflectionOpacity | Opacity of the reflection (e.g., reduce on mobile) |
reflectionBlur | Blur applied to the reflection (e.g., softer on small screens) |
shadowSize | Shadow size below the original element |
Each prop also accepts a static value as before — responsive objects are entirely optional.

Components
You may use the Reflection component to reflect other components.
Example: Complex components
For complex components, you may need to disable certain components to prevent the mirrored version from functioning as a copy. In this example, we used the prop disableChildren for the right component. When enabled, all interactive elements in the reflection are set to disabled with tabIndex={-1}, preventing both mouse and keyboard interaction. The reflection is also marked as aria-hidden for screen readers.


Water ripple effect
Set ripple to add a water distortion effect to the reflection using SVG filters (feTurbulence + feDisplacementMap). Configure the effect with:
rippleStrength(1-50, default 4) — distortion intensityrippleFrequency(default 0.01) — wave density, higher = more wavesrippleSpeed(0-10, default 3) — animation speed, higher = faster, 0 for staticrippleOctaves(1-4, default 1) — noise detail levelrippleSeed(default 1) — seed for reproducible patterns

Dark mode shadow
Set shadowColor="auto" to automatically switch the shadow color between black (light mode) and white (dark mode). This uses CSS light-dark() for seamless theme adaptation.

Accessibility
The reflection is purely decorative:
- The reflection div is marked with
aria-hidden="true"androle="presentation" - When
disableChildrenis enabled, all interactive elements are set todisabledwithtabIndex={-1} - The
reflectionBlurfilter is automatically disabled when the user hasprefers-reduced-motionenabled in their OS settings