
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-flippy
Advanced tools
React-Flippy allows you to create flipping cards in React projects. It can be used as controlled or uncontrolled component.


npm install react-flippy or yarn add react-flippy
import { useRef } from 'react';
import Flippy, { FrontSide, BackSide } from 'react-flippy';
import Flippy, { FrontSide, BackSide } from 'react-flippy';
function Sample() {
const ref = useRef();
return (
<Flippy
flipOnHover={false} // default false
flipOnClick={true} // default false
flipDirection="horizontal" // horizontal or vertical
ref={ref} // to use toggle method like ref.curret.toggle()
// if you pass isFlipped prop component will be controlled component.
// and other props, which will go to div
style={{ width: '200px', height: '200px' }} /// these are optional style, it is not necessary
>
<FrontSide style={{ backgroundColor: '#41669d'}} >
RICK <br />
<button onClick={() => { ref.current.toggle(); }}> Toggle via button</button>
</FrontSide>
<BackSide style={{ backgroundColor: '#175852'}}>
ROCKS
</BackSide>
</Flippy>
)
}
| Prop Name | Description | Values | Default |
|---|---|---|---|
| flipDirection | Direction of flip effect | horizontal/vertical | horizontal |
| flipOnHover | Should card flip on mouse hover | true/false | false |
| flipOnClick | Should card click on mouse click/touch | true/false | true |
| isFlipped | If you pass isFilipped prop component will be "controlled react component" and flipOnHover, flipOnClick functions will not work. You must handle this functionalities with your own logic. | undefined/true/false | undefined |
| ...props | Other props will be passed to container. |
Note: Flippy component has a function named "toggle" in its reference.
| Prop Name | Description | Values | Default |
|---|---|---|---|
| animationDuration | Duration of flip animation, should be used equal with back side for a good view. | number | 600 |
| elementType | Dom element type for card | dom element types | div |
| ...props | Other props will be passed to card. |
| Prop Name | Description | Values | Default |
|---|---|---|---|
| animationDuration | Duration of flip animation, should be used equal with front side for a good view. | number | 600 |
| elementType | Dom element type for card | dom element types | div |
| ...props | Other props will be passed to card. |
To run sample project, clone the repository and run yarn && yarn start To build project, clone repository and run yarn && yarn build
Thanks to: https://github.com/fffilo/flipper I have used same methodology for style management.
FAQs
Unknown package
The npm package react-flippy receives a total of 885 weekly downloads. As such, react-flippy popularity was classified as not popular.
We found that react-flippy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.