base-ui-svelte

Scroll Area

Augments native scroll functionality for custom styling.

View as Markdown

Line 1 — scrollable content for the custom scrollbar demo.

Line 2 — scrollable content for the custom scrollbar demo.

Line 3 — scrollable content for the custom scrollbar demo.

Line 4 — scrollable content for the custom scrollbar demo.

Line 5 — scrollable content for the custom scrollbar demo.

Line 6 — scrollable content for the custom scrollbar demo.

Line 7 — scrollable content for the custom scrollbar demo.

Line 8 — scrollable content for the custom scrollbar demo.

Line 9 — scrollable content for the custom scrollbar demo.

Line 10 — scrollable content for the custom scrollbar demo.

Line 11 — scrollable content for the custom scrollbar demo.

Line 12 — scrollable content for the custom scrollbar demo.

Line 13 — scrollable content for the custom scrollbar demo.

Line 14 — scrollable content for the custom scrollbar demo.

Line 15 — scrollable content for the custom scrollbar demo.

Line 16 — scrollable content for the custom scrollbar demo.

Line 17 — scrollable content for the custom scrollbar demo.

Line 18 — scrollable content for the custom scrollbar demo.

Line 19 — scrollable content for the custom scrollbar demo.

Line 20 — scrollable content for the custom scrollbar demo.

Line 21 — scrollable content for the custom scrollbar demo.

Line 22 — scrollable content for the custom scrollbar demo.

Line 23 — scrollable content for the custom scrollbar demo.

Line 24 — scrollable content for the custom scrollbar demo.

API Reference

Props mirror Base UI React where applicable, adapted for Svelte 5. Native HTML attributes for the rendered element are also accepted unless noted.

ScrollArea.Root

Extends div HTML attributes.

PropertyTypeDefaultDescription
childrenSnippetContent rendered inside the part.
Data attributeDescription
data-scrollingPresent on the element when applicable.

ScrollArea.Content

Extends div HTML attributes.

PropertyTypeDefaultDescription
childrenSnippetContent rendered inside the part.
Data attributeDescription
data-scrollingPresent on the element when applicable.

ScrollArea.Corner

Extends div HTML attributes.

PropertyTypeDefaultDescription
childrenSnippetContent rendered inside the part.
Data attributeDescription
data-scrollingPresent on the element when applicable.

ScrollArea.Scrollbar

Extends div HTML attributes.

PropertyTypeDefaultDescription
orientationScrollAreaOrientation'horizontal'
childrenSnippetContent rendered inside the part.
Data attributeDescription
data-orientationThe orientation of the component.
data-scrollingPresent on the element when applicable.

ScrollArea.Thumb

Extends div HTML attributes.

PropertyTypeDefaultDescription
childrenSnippetContent rendered inside the part.
Data attributeDescription
data-orientationThe orientation of the component.
data-scrollingPresent on the element when applicable.
data-slotPresent on the element when applicable.

ScrollArea.Viewport

Extends div HTML attributes.

PropertyTypeDefaultDescription
childrenSnippetContent rendered inside the part.
Data attributeDescription
data-scrollingPresent on the element when applicable.