Container
A centered wrapper with a maximum width and responsive padding.
On this page
Examples
Container
Centered, capped at 42rem, with responsive padding.
Razor
<KlyContainer Size="KlySize.Xs" Class="rounded-(--klyroo-radius) bg-(--klyroo-bg-elevated) py-6 text-center text-sm">
Centered, capped at 42rem, with responsive padding.
</KlyContainer>API
KlyContainer
Centered wrapper with a maximum width and responsive horizontal padding.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
As |
KlyElement |
KlyElement. |
The element to render, Div by default: Main , Section , Header … Values: Div, Section, Article, Aside, Header, Footer, Main, Nav. |
Class |
string |
Classes added to the root element, merged last so they win over the theme. | |
Size |
KlySize |
KlySize. |
Maximum width: Xs 42rem, Sm 56rem, Md 80rem (default), Lg the 2xl breakpoint, Xl none. Values: Xs, Sm, Md, Lg, Xl. |
Ui |
ContainerUi |
Per-instance class overrides of the slots of the container, see ContainerUi . |
Slots
| Name | Type | Description |
|---|---|---|
ChildContent |
RenderFragment |
Content of the container. |
Ui slots
Ui takes a ContainerUi with one class string per slot, merged after the theme.
| Slot | Styles |
|---|---|
Base |
Classes merged into the base slot of KlyContainer , after the theme and the app configuration. |