How to use the react-pose.rect function in react-pose

To help you get started, we’ve selected a few react-pose 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 carlos-kelly / publications / src / components / ui / icons / logo-badge.tsx View on Github external
transform: "translate(0, 0)",
    transition: { delay: 500, duration: 1000, ease: "anticipate" },
  },
  start: { opacity: 0, transform: "translate(10, -10)" },
});

const NortheastAnglePath = posed.path({
  end: {
    opacity: 1,
    transform: "translate(0, 0)",
    transition: { delay: 500, duration: 1000, ease: "anticipate" },
  },
  start: { opacity: 0, transform: "translate(-10, 10)" },
});

const SlidingArmRect = posed.rect({
  end: {
    height: 62,
    transition: { delay: 1100, type: "spring", stiffness: 70 },
  },
  start: { height: 0 },
});

interface Props {
  size?: number;
  backgroundColor?: string;
}
const LogoBadge: React.FunctionComponent = props => {
  const [startAnimation, setStartAnimation] = React.useState(false);
  React.useEffect(() => {
    setStartAnimation(true);
    return () => setStartAnimation(false);