@soraui/hooks
v0.1.1
Published
SoraUI reusable React hooks
Maintainers
Readme
@soraui/hooks
Lightweight, accessible, zero-dependency React hooks for interactive UI components.
📦 Installation
# Using npm
npm install @soraui/hooks
# Using pnpm
pnpm add @soraui/hooks
# Using yarn
yarn add @soraui/hooks
# Using bun
bun add @soraui/hooks🛠️ Available Hooks & Utilities
useEscapeKey: Accessible keyboard escape key listener with conditional activation.useClickOutside: Reliable click outside listener for popovers, dialogs, and dropdowns.useFocusTrap: WAI-ARIA compliant modal focus trapping with initial focus and restore focus on unmount.usePositioning: Lightweight, collision-aware floating element positioning (no heavy external dependencies).useControllableState: Seamless handling of controlled vs uncontrolled component states.useRovingFocus: Keyboard navigation (arrow keys, Home/End) across tablists, menus, and item lists.Portal: Render overlay elements cleanly intodocument.bodyor custom DOM containers.
📄 License
MIT © 2026 SoraUI Contributors
