Socket
Socket
Sign inDemoInstall

use-hide-scrollbar

Package Overview
Dependencies
3
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    use-hide-scrollbar

custom react hook to hide browser scrollbar


Version published
Weekly downloads
2
Maintainers
1
Install size
3.63 kB
Created
Weekly downloads
 

Readme

Source

use-hide-scrollbar

custom react hook to hide browser scrollbar

Install

yarn add use-hide-scrollbar

Usage

import React from 'react';
import {useHideScrollbar} from "use-hide-scrollbar";
const App = () => {

  const [trigger, setTrigger] = useState(false);
  useHideScrollbar(trigger);
  console.log(trigger)
  return (
    <div>
      <button onClick={() => setTrigger(prev => !prev)}>Click me!</button>
    </div>
  );
}

All you need is to pass a boolean as a parameter

  useHideScrollbar(trigger);

Show your support

Give a ⭐️ if this project helped you!

Keywords

FAQs

Last updated on 19 Jan 2021

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc