Component

FocusFade

It fades focused content away, waits for the browser to notice, and restores the exact same content moments later.

01 / Preview

Try it yourself.

Preview Interactive
Focus me

Focus it once. The content disappears, then returns unchanged.

Mechanism
1
Focus the content by clicking or tabbing.
2
Wait for the unnecessary disappearance.
3
It returns exactly as it was.

02 / Usage

Put it somewhere.

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

export function Example() {
  return (
    <FocusFade>
      <span>Focus me</span>
    </FocusFade>
  );
}

03 / API

Small surface area.

PropTypeDescription
childrenReactNodeThe content that disappears and returns on focus.