Z
Zyeon UI

useFocusTrap · Zyeon UI

A hook that keeps keyboard focus inside a container: moves focus in, cycles Tab both ways, only the innermost trap reacts, and focus returns to the trigger on release.

npx shadcn@latest add @zyeon/use-focus-trap
Preview useFocusTrap on Zyeon UI's site (opens in a new tab)

Not checked yet

Zyeon UI limits how often it can be asked, and useFocusTrap hasn't had its turn. Its source will show here once it has.