react-scrollbar-size

  • Version 4.0.0
  • Published
  • 17 kB
  • No dependencies
  • MIT license

Install

npm i react-scrollbar-size
yarn add react-scrollbar-size
pnpm add react-scrollbar-size

Overview

React hook to calculate the size of browser scrollbars

Index

Functions

function useScrollbarSize

useScrollbarSize: () => ScrollbarMeasurements;

    Interfaces

    interface ScrollbarMeasurements

    interface ScrollbarMeasurements {}

      property height

      height: number;
      • Current height of the scrollbar

      property width

      width: number;
      • Current width of the scrollbar

      Package Files (2)

      Dependencies (0)

      No dependencies.

      Dev Dependencies (0)

      No dev dependencies.

      Peer Dependencies (1)

      Badge

      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/react-scrollbar-size.

      • Markdown
        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/react-scrollbar-size)
      • HTML
        <a href="https://www.jsdocs.io/package/react-scrollbar-size"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>