How to use the @react-spring/web.config.default function in @react-spring/web

To help you get started, we’ve selected a few @react-spring/web examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tim-soft / react-spring-lightbox / src / components / ImageStage / components / Image / index.js View on Github external
const defaultImageTransform = () => ({
    scale: 1,
    translateX: 0,
    translateY: 0,
    config: { ...config.default, precision: 0.01 }
  });
github tim-soft / react-spring-lightbox / src / components / PageContainer / index.js View on Github external
const PageContainer = ({
  children,
  isOpen,
  className,
  style,
  pageTransitionConfig
}) => {
  const defaultTransition = {
    from: { transform: 'scale(0.75)', opacity: 0 },
    enter: { transform: 'scale(1)', opacity: 1 },
    leave: { transform: 'scale(0.75)', opacity: 0 },
    config: { ...config.default, mass: 1, tension: 320, friction: 32 }
  };

  const transitions = useTransition(
    isOpen,
    null,
    merge(defaultTransition, pageTransitionConfig)
  );

  return transitions.map(
    ({ item, key, props }) =>
      item && (

@react-spring/web

`react-dom` support

MIT
Latest version published 30 days ago

Package Health Score

94 / 100
Full package analysis