react-usecollapsible

‡ View on Github

I've recently become fascinated with the world of Accessibility when it comes to my day-to-day as well as just-for-fun work building interfaces on the web. Inspired by some of the more robust tools out there (looking at you react-aria) I decided to build a super simple React Hook to share with the world.

So here comes another NPM package, react-usecollapsible — a React hook for easily creating accessible collapsed content. It doesn't animate, it doesn't style, it's not even a component. This is a single purpose package for providing an accessible experience when building any sort of collapsing/expanding content.

Use it for FAQs, Accordions, Drawers, and anything you can dream up.