Flip

Flip is a component that provides an animation to switch between two elements while flipping.

Usage

import { Flip } from "@yamada-ui/react"
<Flip />

Change Direction

To change the direction, set orientation to "horizontal" or "vertical". By default, "horizontal" is set.

Change the Duration

To change the duration, set a numerical value (seconds) to duration.

Delay

If you want to delay the switch, set a numerical value (seconds) to delay.

Disable

To disable, set disabled to true.

Read-Only

To ready-Only, set readOnly to true.

Control

Props

Accessibility

The Flip follows the WAI-ARIA - Button Pattern for accessibility.

When aria-label is set, it will be read aloud by screen readers.

<Flip
  aria-label="Menu"
  from={<MenuIcon fontSize="2xl" />}
  to={<XIcon fontSize="2xl" />}
/>

Keyboard Navigation

KeyDescriptionState
Enter, SpaceWhen element has focus, activates it.-

Similar Components

Airy

Airy is a component that provides a smooth animation to switch between two elements.

Motion

Motion is a convenient component that extends the Yamada UI Style Props to Motion.

Ripple

Ripple is a component that adds a ripple effect to elements, allowing users to recognize when they have clicked.

Rotate

Rotate is a component that provides an animation to switch between two elements while rotating.

Collapse

Collapse is a component that allows you to expand or collapse an element for display.

Fade

Fade is a component that gradually shows or hides an element.

FadeScale

FadeScale is a component that gradually scales up to reveal or scales down to hide an element.

Skeleton

Skeleton is a component that acts as a placeholder until content is loaded.

Uses Components & Hooks