scrollbar-style

This package detects the preferred scroller style for Atom on OS X using the `+preferredScrollerStyle` method on [`NSScroller`][ns-scroller]. For compatibility, this library always returns "legacy" on Windows and Linux.

Usage no npm install needed!

<script type="module">
  import scrollbarStyle from 'https://cdn.skypack.dev/scrollbar-style';
</script>

README

Scrollbar Style Build Status

This package detects the preferred scroller style for Atom on OS X using the +preferredScrollerStyle method on NSScroller. For compatibility, this library always returns "legacy" on Windows and Linux.

const scrollbarStyle = require('scrollbar-style')

const style = scrollbarStyle.getPreferredScrollbarStyle()
console.log(style) // ==> 'legacy' or 'overlay'

scrollbarStyle.onDidChangePreferredScrollbarStyle((newStyle) => {
  console.log('style changed', newStyle)
})