CSS scrollbar-width Property
Description
The scrollbar-width property controls how thick an element’s scrollbar appears and how much horizontal space that scrollbar consumes beside scrollable content. It’s applied to the scroll container itself and directly influences the visual prominence of the scrollbar track and thumb — making the slider more or less noticeable and changing the amount of layout space reserved for the control. Because it is a presentation-level property, authors use it to tune how a scrolling interface integrates with surrounding UI elements and typography.
Because changing the thickness of scrollbars changes the space reserved for them, the property can affect layout and reflow: reducing scrollbar width can increase the area available to content, while widening it can reduce the content area and potentially introduce or remove overflow. That interaction makes it important to think about how it works together with scrolling behavior and overflow controls — for example, when you manage whether content scrolls or is clipped with overflow, the visual width of the scrollbar is one of the things that determines the final visible content area and hit targets for pointer interactions.
From a design and accessibility perspective, scrollbar-width is a tool for balancing aesthetics and usability. Thinner scrollbars can produce a cleaner, less cluttered layout, but very narrow controls may be harder to target with a mouse or to notice for users who rely on visual cues; conversely, thicker scrollbars can improve discoverability and hit area but reduce content space. It’s commonly used in conjunction with scrollbar color and contrast adjustments to create cohesive scrollbar styling — for example pairing it with scrollbar-color to control both thickness and appearance — while still being mindful that user agents, platform settings, and user preferences may alter or override the final rendering.
Practical use of the property should consider device differences (pointer vs. touch), the expectations of the target audience, and the interaction with custom scrolling solutions. Because scrollbar width influences layout, test changes on typical content lengths and viewport sizes to avoid accidental shifts or overflow changes. If a design requires very different scrollbar behavior (for example fully custom UI scrollers or hide-on-idle behavior), those needs are often handled with a combination of styling, layout adjustments, and script-driven custom scroll components rather than by width adjustments alone.
Definition
- Initial value
- auto
- Applies to
- scrolling boxes
- Inherited
- no
- Computed value
- as specified
- Animatable
- by computed value type
- JavaScript syntax
- object.style.scrollbarWidth
Syntax
scrollbar-width: auto | thin | none
Values
- auto
- thin
- none
Example
Browser Support
The following information will show you the current browser support for the CSS scrollbar-width property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported in some modern browsers, but not all.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
