Component
PressEscape
It makes its content flee while pressed, then restores everything when the pointer or key is released.
01 / Preview
Try it yourself.
Press and hold. The content leaves, then returns unchanged.
Mechanism
- 1
- Press and hold the content.
- 2
- Watch the label escape from its own button.
- 3
- Release it and nothing has changed.
02 / Usage
Put it somewhere.
example.tsxTSX
import { PressEscape } from "gra-ui";
export function Example() {
return <PressEscape>Hold this</PressEscape>;
}03 / API
Small surface area.
PropTypeDescription
childrenReactNodeThe content that flees while the button is pressed.