ScrollArea
A styled scroll container that stays reachable with the keyboard.
On this page
Examples
Scroll area
Razor
<KlyScrollArea Class="h-40 w-full max-w-sm rounded-lg border border-(--klyroo-border)" AriaLabel="Changelog" data-testid="scroll">
<ul class="flex flex-col gap-2 p-3 text-sm">
@for (var i = 1; i <= 20; i++)
{
<li>Entry @i: something changed here.</li>
}
</ul>
</KlyScrollArea>API
KlyScrollArea
Styled scroll container that stays reachable with the keyboard while its content overflows.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
AriaLabel |
string |
Accessible name of the scrollable region. | |
Class |
string |
Classes added to the root element, merged last so they win over the theme. | |
Orientation |
KlyOrientation? |
KlyOrientation. |
Scrolling direction. Null scrolls both ways. Values: Horizontal, Vertical. |
Ui |
ScrollAreaUi |
Per-instance class overrides of the slots of the scroll area, see ScrollAreaUi . They are merged after the theme and the Class parameter wins on the root slot. |
Slots
| Name | Type | Description |
|---|---|---|
ChildContent |
RenderFragment |
Content of the scroll area. |
Ui slots
Ui takes a ScrollAreaUi with one class string per slot, merged after the theme.
| Slot | Styles |
|---|---|
Root |
Classes merged into the root slot of KlyScrollArea , after the theme and the app configuration. |
Viewport |
Classes merged into the viewport slot of KlyScrollArea , after the theme and the app configuration. |