Slideover
A full-height panel that slides in from any edge, for details and forms.
On this page
Examples
Slideover
Slideover: closed
Razor
<div class="flex flex-col items-center gap-3">
<KlySlideover @bind-Open="_open" Title="Edit profile" Description="Changes are saved when you press Save.">
<ChildContent><KlyButton Label="Open slideover" Variant="ButtonVariant.Outline" data-testid="slideover-trigger" /></ChildContent>
<Body>
<div class="flex flex-col gap-4">
<KlyFormField Label="Name"><KlyInput Value="Ada Lovelace" /></KlyFormField>
<KlyFormField Label="Bio"><KlyTextarea Rows="3" /></KlyFormField>
</div>
</Body>
<Footer>
<KlyButton Label="Cancel" Color="KlyColor.Neutral" Variant="ButtonVariant.Ghost" data-kly-close />
<KlyButton Label="Save" data-kly-close data-testid="slideover-save" />
</Footer>
</KlySlideover>
<p class="text-sm text-(--klyroo-text-muted)" data-testid="slideover-state">Slideover: @(_open ? "open" : "closed")</p>
</div>
@code {
private bool _open;
}Sides
Razor
<KlySlideover Side="SlideoverSide.Left" Title="Navigation">
<ChildContent><KlyButton Label="Left" Variant="ButtonVariant.Outline" /></ChildContent>
<Body><p class="text-sm text-(--klyroo-text-muted)">Slides in from the left.</p></Body>
</KlySlideover>
<KlySlideover Side="SlideoverSide.Right" Title="Details">
<ChildContent><KlyButton Label="Right" Variant="ButtonVariant.Outline" /></ChildContent>
<Body><p class="text-sm text-(--klyroo-text-muted)">Slides in from the right.</p></Body>
</KlySlideover>
<KlySlideover Side="SlideoverSide.Bottom" Title="Activity" Close="false">
<ChildContent><KlyButton Label="Bottom" Variant="ButtonVariant.Outline" /></ChildContent>
<Body><p class="text-sm text-(--klyroo-text-muted)">Slides up from the bottom. Escape closes it.</p></Body>
</KlySlideover>API
KlySlideover
Full-height side panel in a modal dialog, with a title, a description, a body and a footer.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
AriaLabel |
string |
Accessible name when there is no Title . | |
Class |
string |
Classes added to the root element, merged last so they win over the theme. | |
Close |
bool |
true |
Shows the close button in the header. |
Description |
string |
Text under the title of the slideover. | |
Dismissible |
bool |
true |
Escape and a click on the backdrop close the panel. |
Inset |
bool |
false |
Floats the panel away from the edges of the screen. |
Open (@bind-Open) |
bool |
false |
Open state. Use @bind-Open : the browser closes the panel on its own (Escape, backdrop, close button). |
Side |
SlideoverSide |
SlideoverSide. |
The edge the panel slides in from. Values: Right, Left, Top, Bottom. |
Title |
string |
Title of the slideover, which also names the dialog. | |
Ui |
SlideoverUi |
Per-instance class overrides of the slots of the slideover, see SlideoverUi . They are merged after the theme and the Class parameter wins on the root slot. |
Slots
| Name | Type | Description |
|---|---|---|
Body |
RenderFragment |
Content of the body of the slideover. |
Footer |
RenderFragment |
Footer actions. Add data-kly-close to a button to make it close the panel. |
ChildContent |
RenderFragment |
The trigger: its first button opens the panel. |
Ui slots
Ui takes a SlideoverUi with one class string per slot, merged after the theme.
| Slot | Styles |
|---|---|
Content |
Classes merged into the content slot of KlySlideover , after the theme and the app configuration. |
Header |
Classes merged into the header slot of KlySlideover , after the theme and the app configuration. |
Wrapper |
Classes merged into the wrapper slot of KlySlideover , after the theme and the app configuration. |
Title |
Classes merged into the title slot of KlySlideover , after the theme and the app configuration. |
Description |
Classes merged into the description slot of KlySlideover , after the theme and the app configuration. |
Close |
Classes merged into the close slot of KlySlideover , after the theme and the app configuration. |
Body |
Classes merged into the body slot of KlySlideover , after the theme and the app configuration. |
Footer |
Classes merged into the footer slot of KlySlideover , after the theme and the app configuration. |