
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
mac-scrollbar
Advanced tools
English | δΈζ
Scrollbar React component with macOS style.
mac-scrollbar
The scroll bar of each browser has a unique style and the width is also inconsistent, thus compressing the display of the content area. Now, we need a beautiful and simple scroll bar from macOS style.
Note This component is not compatible with IE11, it needs to be compatible with lower version browsers.
yarn add mac-scrollbar
Import style
import 'mac-scrollbar/dist/mac-scrollbar.css';
Basic
import { MacScrollbar } from 'mac-scrollbar';
function Foo() {
return (
<MacScrollbar>
<div>Content</div>
</MacScrollbar>
);
}
Global window scrollbar
import { GlobalScrollbar } from 'mac-scrollbar';
function App() {
return <GlobalScrollbar />;
}
Name | Type | Description |
---|---|---|
skin | 'light' | 'dark' | Adapt to the background color of the container. Default 'light' |
trackGap | number | TrackGap | ((showBarX: boolean, showBarY: boolean) => TrackGap) | Gap at the cross end of the scroll bar. Default 16 |
trackStyle | (horizontal?: boolean) => CSSProperties | |
thumbStyle | (horizontal?: boolean) => CSSProperties | |
minThumbSize | number | Minimum thumb bar size. Default 20 |
suppressAutoHide | boolean | When set to true, the scrollbar will not be automatically hidden. |
Name | Type | Description |
---|---|---|
suppressScrollX | number | When set to true, the scrollbar in X-axis will not be available, regardless of the content width. |
suppressScrollY | number | When set to true, the scroll bar in Y-axis will not be available, regardless of the content height. |
as | string | Custom element type. Default 'div' |
FAQs
A macos style react scroll bar component
The npm package mac-scrollbar receives a total of 3,743 weekly downloads. As such, mac-scrollbar popularity was classified as popular.
We found that mac-scrollbar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 0 open source maintainers collaborating on the project.
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.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600Γ faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.