From ffbbc6172649c8c453c43a6e7d26405c60504c2f Mon Sep 17 00:00:00 2001 From: Satyam <95536056+Satyam-Rastogi@users.noreply.github.com> Date: Wed, 18 Feb 2026 12:41:59 +0530 Subject: [PATCH] fix(landing): optimize comparison slider text for mobile and add fade transitions - Added whitespace-nowrap to all text labels on both Old Way and Our Way sides to prevent inconsistent text wrapping on mobile - Added opacity fade to Our Way labels based on slider position (fades out as slider moves right) - Matched symmetric fade behavior: both sides now smoothly fade in/out based on slider position - Added transition-opacity duration-150 for smooth fade animation --- src/components/ComparisonSlider.jsx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/components/ComparisonSlider.jsx b/src/components/ComparisonSlider.jsx index 9bf0824..9e066ac 100644 --- a/src/components/ComparisonSlider.jsx +++ b/src/components/ComparisonSlider.jsx @@ -47,8 +47,11 @@ export const ComparisonSlider = () => { alt="The New Way" className="w-full h-full object-cover" /> -
- +
+ Our Way
@@ -58,7 +61,7 @@ export const ComparisonSlider = () => { "AI + Thermal Imaging", "~30% Lower Costs", ].map((text, i) => ( -
+
{text}
@@ -71,7 +74,7 @@ export const ComparisonSlider = () => { "Deploy Reps with confidence", "Evidence-driven damage detection", ].map((text, i) => ( -
+
{text}
@@ -94,8 +97,11 @@ export const ComparisonSlider = () => { style={{ width: containerRef.current?.offsetWidth }} /> {/* Overlay Text visible only when this side is dominant */} -
- +
+ The Old Way
@@ -105,7 +111,7 @@ export const ComparisonSlider = () => { "Slow Turnaround Times", "Hidden Material Costs" ].map((text, i) => ( -
+