Interactivity
Utilities for controlling the width of an element's scrollbar.
| Class | Styles |
|---|---|
scrollbar-auto | scrollbar-width: auto; |
scrollbar-thin | scrollbar-width: thin; |
scrollbar-none | scrollbar-width: none; |
Use the scrollbar-auto utility to use the browser's default scrollbar width:
<div class="scrollbar-auto overflow-auto ..."> <!-- ... --></div>Use the scrollbar-thin utility to use a thinner scrollbar:
Scroll vertically
<div class="scrollbar-thin overflow-auto ..."> <!-- ... --></div>Use the scrollbar-none utility to hide scrollbars while still allowing an element to scroll:
<div class="scrollbar-none overflow-auto ..."> <!-- ... --></div>These utilities only support the browser keywords auto, thin, and none.
Prefix a scrollbar-width utility with a breakpoint variant like md: to only apply the utility at medium screen sizes and above:
<div class="scrollbar-none md:scrollbar-auto ..."> <!-- ... --></div>Learn more about using variants in the variants documentation.