JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › ScrollBar › ScrollBar Show-Buttons Attribute is Confusing › Reply To: ScrollBar Show-Buttons Attribute is Confusing
Hi ctstrist,
the showButtons
property which controls the visibility of the scroll buttons of the scroll bar is by default set to true. The only way to change it to false is to set it dynamically via javascript. However an alternative approach is to change the size of the buttons via the CSS variable and avoid using javascript. Using the --smart-scroll-button-size
you can set their size to 1px which is the minimum and the buttons will not be visible, like so:
#myScrollBar {
--smart-scroll-button-size: 1px;
}
Also there’s an issue with your code snipped:
</span> <span class=”tag”><smart-scroll-bar</span><span class=”tag”>></smart-scroll-bar> by default</span>
.
The span tag with class ‘tag’ encloses the opening tag of the ScrollBar but it should not. No content should be added between the opening and closing tags of the Scroll bar. The valid approach would be:
<span class=”tag”></span><span class=”tag”><smart-scroll-bar></smart-scroll-bar> by default</span>
Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.com