Note: there is no useScrollbar hook (or any export by that name) in the package. Themed scrollbar CSS is injected automatically by ThemeProvider/AppRoot — it's controlled entirely by the scrollbar and noScrollbarCss props documented below.
When ThemeProvider renders as the root (isRoot, which AppRoot always sets), it computes a global stylesheet targeting ::-webkit-scrollbar and related pseudo-elements, scoped to the current theme's root class (.xui-{theme.name}-theme-root), and renders it via the same internal ServerStyleTag mechanism used for the rest of the theme's global CSS (see the server-styles docs). Unless noScrollbarCss is set, this happens on every render of ThemeProvider/AppRoot.
ThemeProvider and AppRoot)scrollbar sub-fieldsThe generated rules only cover the WebKit-style pseudo-elements (::-webkit-scrollbar, ::-webkit-scrollbar-thumb, ::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-track) with a fixed 6px border radius on the thumb/track — there is no scrollbar-width/scrollbar-color (Firefox standard properties) rule generated.
tsx
import { AppRoot } from 'xanui-core' <AppRoot theme={theme}> {children}</AppRoot>tsx
<AppRoot theme={theme} noScrollbarCss> {children}</AppRoot>tsx
<AppRoot theme={theme} scrollbar={{ size: , thumbColor: '#94a3b8', trackColor: '#1e293b' }}> {children}</AppRoot>The same scrollbar / noScrollbarCss props work identically on ThemeProvider directly, if you're using it without AppRoot:
tsx
import { ThemeProvider } from 'xanui-core' <ThemeProvider theme={theme} isRoot scrollbar={{ size: }}> {children}</ThemeProvider>