New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

piral-hooks-utils

Package Overview
Dependencies
Maintainers
1
Versions
496
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

piral-hooks-utils

Hooks and HOC for pilets and Piral instances.

latest
Source
npmnpm
Version
1.10.3
Version published
Weekly downloads
1.4K
-28.38%
Maintainers
1
Weekly downloads
 
Created
Source

Piral Logo

Piral Hooks Utils · GitHub License npm version tested with vitest Community Chat

A set of hooks and HOCs for pilets and Piral instances.

Installation

This should only be installed as a dependency (dependencies) as it is only designed mostly for runtime/consumption by Piral or pilets. You could also share it explicitly or implicitly from your Piral instance if you'd like to optimize usage in your pilets. It's not required though as the code provided by it is minimal and tree-shakable.

If you'd love to use yarn:

yarn add piral-hooks-utils

Alternatively, npm works reliably, too:

npm i --save piral-hooks-utils

Included Hooks

The following hooks are included.

useAfterVisible

A hook to indicate something was suddenly visible.

useAsyncReplace

Gives a full async lifecycle in a hook.

useLockBodyScroll

Hook that locks scrolling on the main document.

useOnClickOutside

Hook that detects if a click outside the given reference has been performed.

useOnScreenVisible

Hook that detects if a reference element within the main document is visible.

usePiletApi

Retrieves the Pilet API stored in the provider.

usePrompt

Hook to notify the user in case of potential data loss when performing a page transition (internal or external).

License

Piral is released using the MIT license. For more information see the license file.

Keywords

piral

FAQs

Package last updated on 24 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts