@gfazioli/mantine-flip
A Mantine component that flips the content of the component when hovered over.
Installation
After installation import package styles at the root of your application:
You can import styles within a layer @layer mantine-flip
by importing @gfazioli/mantine-flip/styles.layer.css
file.
Usage
Norway Fjord Adventures
With Fjord Tours you can explore more of the magical fjord landscapes with tours and activities on and around the fjords of Norway
Edit Widget
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, voluptatum.
Uncontrollded
Front Card
The front card
Back Card
Controllded
You may control the state of the card by setting the flipped
prop to true
or false
.
This is useful when you want to control the state of the card from the parent component.
Front Card
The front card
Back Card
Inital face and Flip.Target
For controlled Flip components, you will use
useState
to determine which side of the component to initially show. Additionally, you will not need to useFlip.Target
for buttons, but you can control them manually to keep the states synchronized.
Default Flipped (face)
You may display the initial face of the card by setting the defaultFlipped
prop to true
.
Front Card
The front card
Back Card
In this case the defaultFlipped
prop is set to true
, and the back card is visible
More examples
Credit card
The Bank
Signin form
Welcome back!
Do not have an account yet?