ContentSurround
Links to the previous and the next page, with their titles and descriptions.
On this page
Examples
Previous and next
The bottom of every component page of this site is a ContentSurround, in the order of the sidebar.
Razor
@* Plain links with rel="prev" and rel="next". Without a previous page the next one stays in the second column. *@
<div class="grid w-full gap-6">
<KlyContentSurround Previous="_previous" Next="_next" AriaLabel="Example pages" data-testid="content-surround-example" />
<KlyContentSurround Next="_next" AriaLabel="First page" />
</div>
@code {
private static readonly KlyContentSurroundLink _previous = new("Installation", "/docs/installation") { Description = "Add the package and register the services." };
private static readonly KlyContentSurroundLink _next = new("Theming", "/docs/theming") { Description = "Colors, radius and fonts, in CSS and in C#." };
}API
KlyContentSurround
Links to the previous and next page of a documentation site.
Parameters
| Name | Type | Description |
|---|---|---|
AriaLabel |
string |
Accessible name of the navigation landmark. Defaults to the built-in text. |
Class |
string |
Classes added to the root element, merged last so they win over the theme. |
Next |
KlyContent |
The page after this one. |
Previous |
KlyContent |
The page before this one. Without it the next page stays in the second column. |
Ui |
Content |
Per-instance class overrides of the slots of the content surround, see ContentSurroundUi . They are merged after the theme and the Class parameter wins on the root slot. |
Ui slots
Ui takes a Content with one class string per slot, merged after the theme.
| Slot | Styles |
|---|---|
Root |
Classes merged into the root slot of KlyContentSurround , after the theme and the app configuration. |
Link |
Classes merged into the link slot of KlyContentSurround , after the theme and the app configuration. |
Caption |
Classes merged into the caption slot of KlyContentSurround , after the theme and the app configuration. |
Icon |
Classes merged into the icon slot of KlyContentSurround , after the theme and the app configuration. |
Title |
Classes merged into the title slot of KlyContentSurround , after the theme and the app configuration. |
Description |
Classes merged into the description slot of KlyContentSurround , after the theme and the app configuration. |