Component

EqualChoice

It asks you to choose a side, moves the content there, and restores the original position immediately afterward.

01 / Preview

Try it yourself.

Preview Interactive
Stay here

Double-click, pick either side, and watch it return.

Mechanism
1
Double-click the content.
2
Choose either identical destination.
3
It returns to where it started.

02 / Usage

Put it somewhere.

example.tsxTSX
import { EqualChoice } from "gra-ui";

export function Example() {
  return (
    <EqualChoice>
      <span>Stay here</span>
    </EqualChoice>
  );
}

03 / API

Small surface area.

PropTypeDescription
childrenReactNodeThe content offered two equivalent destinations.