diff --git a/app/components/ClientCarousel.tsx b/app/components/ClientCarousel.tsx index 9f1e8f31..b851748c 100644 --- a/app/components/ClientCarousel.tsx +++ b/app/components/ClientCarousel.tsx @@ -8,6 +8,7 @@ import { ASSETS_BASE_URL } from '~/config/assets'; import { OptimizedImage } from './ui/optimized-image'; +import { usePrefersReducedMotion } from '~/hooks/use-prefers-reduced-motion'; import { useWindowSize } from '~/hooks/useWindowSize'; const items = [ @@ -91,6 +92,9 @@ const ClientCarousel: React.FunctionComponent<{ }> = ({ shouldDisplayTitle }) => { const { t } = useTranslation('common'); const browserWidth = useWindowSize(); + // The CSS reduced motion rule cannot reach framer-motion: the logos stand + // still at their start position instead of looping. + const reducedMotion = usePrefersReducedMotion(); const slideWidth = useMemo( () => (itemWidth * items.length + itemGap * (items.length + 1)) * 2, @@ -144,14 +148,18 @@ const ClientCarousel: React.FunctionComponent<{ w: 'auto', px: '4', })} - animate={{ - x: [0, -delta + 'px'], - transition: { - ease: 'linear', - duration: delta / 15, - repeat: Infinity, - }, - }} + animate={ + reducedMotion + ? { x: 0, transition: { duration: 0 } } + : { + x: [0, -delta + 'px'], + transition: { + ease: 'linear', + duration: delta / 15, + repeat: Infinity, + }, + } + } > {duplicateItems.map((item, i) => (
  • { const { t } = useTranslation('about'); @@ -138,7 +144,7 @@ export const DataIllustration = () => { { transform="translate(470, 455) scale(1.2)" d="M0,0 L25,40 L10,35 L0,55 Z" fill="currentColor" - className={css({ animation: 'float-cursor' })} + className={cx(css({ animation: 'float-cursor' }), cursorAtRest)} /> diff --git a/app/components/navbar-v2/nav-disclosure.tsx b/app/components/navbar-v2/nav-disclosure.tsx index 9631fddd..9157cea9 100644 --- a/app/components/navbar-v2/nav-disclosure.tsx +++ b/app/components/navbar-v2/nav-disclosure.tsx @@ -251,6 +251,8 @@ export function NavDisclosure({