npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@fomolol/tacklebox

v0.2.1

Published

This tacklebox is full of hooks.

Downloads

24

Readme

TackleBox

Introduction

The Tackle Box holds the hooks, you do the math

Setup

$ npm i @fomolol/tacklebox

or use whatever package manager you like the most

Features

The toolkit is composed of the following hooks:

useCanvas – for when you want to use canvas

useClipboard – copies things to the clipboard (so the user can paste with haste)

useCookieBanner – tackles some cookie banner related saving to local storage

useCustomConsole – you can now make the console (via inspector) say what you want

useCursorStyle – this can be used with the @fomolol/dope CursorContext and Cusor components.

useDebug – returns true if #debug is present in the url

useId – more coming soon

useForkRef – this is used in the CanvasEraser component in @fomolol/dope.

useInterval – create and dispose intervals

useDocumentReadyState – more coming soon

useEventBus – more coming soon

useFocus – focus state

useGiphy – now you can add giphys anywhere. NOTE: You need to sign up for the api and add the env var GIPHY_API_KEY to your env vars. See https://developers.giphy.com/ and https://www.npmjs.com/package/giphy-api for more.

useIsTouchDevice – duh

useIsVisible – duh

useHorizontalScroll – duh

useHoverImage – now you can make those sexy hover images like a pro.

useIsomophicLayoutEffect – runs react's useLayoutEffect if in browser, if not, runs a plain useEffect instead

useIntersectionObserver – spring-based intersection action

useIntersectionObserver – spring-based intersection action

useMatterJS – if you decide you want to use Matter.js in React

useMediaQuery – css-like media query support in Javascript.

useMousePosition – handles collecting the mouse position

useMouseDirection – handles finding the direction the mouse moved

useHashScroll – when using smooth scrolling, the hash in the url can cause issues. Load this up to solve those.

useParallax – cool parallax movement

usePopup – Window popups are a pain in the arse in React, so this hook makes them easier to deal with.

usePaperJS – if you decide you want to use Paper.js in React

useRect – shorthand version of getboundingclientrect

useSmoothTransform – shorthand to make a transform that uses spring dynamics

useSlots – brings vue slots to react

useSticky – sticky elements based on a class name

useStickyHeader – making those sticky headers easier to manage

useTheme – this helps when you have a dark/light mode responsive site

useTimeout – timeout helper

useWindowSize – window sizing updated in sync with @react-spring/rafz

If you don't find what you're looking for, it's likely part of the react-use collection.

Some of our favorites from this collection include:

Definitely check the collection out at http://streamich.github.io/react-use

Another worthy collection of fine hooks is located at: https://github.com/jaredLunde/react-hook. Some highlights include:

Authors

This set of hooks is curated and maintained by the FOMOLOL Classified team:

This project template and some of the hooks were borrowed from the amazing work of Studio Freight:

License

The MIT License.