Skip to content
Elements Separator

Separator

A line between sections, optionally with a label or an icon, horizontal or vertical.

On this page

Examples

Horizontal

Razor
<div class="flex w-full max-w-md flex-col gap-6">
    <KlySeparator />
    <KlySeparator Label="or" />
    <KlySeparator Icon='KlyIcons.Named("star", "size-5")' Color="KlyColor.Primary" Type="KlySeparatorType.Dashed" Size="KlySize.Sm" />
</div>

Vertical

Docs Blog Changelog
Razor
<div class="flex h-10 items-center gap-4 text-sm">
    <span>Docs</span>
    <KlySeparator Orientation="KlyOrientation.Vertical" />
    <span>Blog</span>
    <KlySeparator Orientation="KlyOrientation.Vertical" Label="and" />
    <span>Changelog</span>
</div>

API

KlySeparator

Horizontal or vertical divider, with an optional label or icon.

Parameters

Name Type Default Description
Class string Classes added to the root element, merged last so they win over the theme.
Color KlyColor "neutral" Semantic color of the line: a built-in KlyColor or the name of a color you defined. Values: primary, secondary, success, info, warning, error, neutral.
Label string Text in the middle of the line. It also names the separator for assistive technology.
Orientation KlyOrientation KlyOrientation.Horizontal Direction of the layout: Horizontal or Vertical . Values: Horizontal, Vertical.
Size KlySize KlySize.Xs Thickness of the line. Values: Xs, Sm, Md, Lg, Xl.
Type KlySeparatorType KlySeparatorType.Solid Line style: Solid , Dashed or Dotted . Values: Solid, Dashed, Dotted.
Ui SeparatorUi Per-instance class overrides of the slots of the separator, see SeparatorUi . They are merged after the theme and the Class parameter wins on the root slot.

Slots

Name Type Description
Icon RenderFragment Icon of the separator, as markup such as a KlyIcon .
ChildContent RenderFragment Extra decorative content in the middle, next to the icon and label.

Ui slots

Ui takes a SeparatorUi with one class string per slot, merged after the theme.

Slot Styles
Root Classes merged into the root slot of KlySeparator , after the theme and the app configuration.
Border Classes merged into the border slot of KlySeparator , after the theme and the app configuration.
Container Classes merged into the container slot of KlySeparator , after the theme and the app configuration.
Label Classes merged into the label slot of KlySeparator , after the theme and the app configuration.
Icon Classes merged into the icon slot of KlySeparator , after the theme and the app configuration.