How to use the react-pose.img 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 Popmotion / popmotion / playground / plugins / react-pose / index.js View on Github external
key={`s-${i.id}`}
                text={i.id}
                style={{ background: 'red', width: 100, height: 100 }}
                pose={should_flip ? 'flipped' : 'enter'}
                onDel={() => this.remove(i)}
                onFlip={() => this.flip(i)}
              />
            );
          })}
        
      
    );
  }
}

const Img = posed.img({
  dull: {
    filter: 'grayscale(100%) brightness(100%)'
  },
  coloured: {
    filter: 'grayscale(0%) brightness(100%)'
  }
});

export const Filter = () => (
  <img src="https://popmotion.io/images/dusk.jpg">
);
github Popmotion / popmotion / playground / plugins / react-pose / index.js View on Github external
`;

const Label = styled(
  posed.span({
    init: { color: '#000' },
    drag: { color: '#f00' }
  })
)``;

export const DragChildren = () =&gt; (
  
    <label>Drag me</label>
  
);

export const SingleFilter = posed.img({
  hoverable: true,
  init: { filter: 'blur(2px)' },
  hover: { filter: 'blur(0px)' }
});

const DynamicPositionedBox = styled(
  posed.div({
    move: {
      x: () =&gt; Math.random() * 200,
      y: () =&gt; Math.random() * 200
    }
  })
)`
  width: 100px;
  height: 100px;
  background: hotpink;
github alexieyizhe / alexxie.ca / src / pages / index.jsx View on Github external
}
`;

const MainPagePic = styled(posed.div(fadeEnterConfig))`
  position: absolute;
  bottom: 0;
  right: -10%;
  width: 70%;
  z-index: -1;

  ${mediaSize.phone`
    width: 105%;
  `};
`;

const Logo = posed.img({
  enter: {
    x: -200,
    opacity: 0
  },
  normal: {
    x: 0,
    opacity: 1,
    transition: { duration: 500 }
  }
});

class HomePage extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      iconAnimate: false,