New to Telerik UI for Blazor? Download free 30-day trial

Separators

You can visually separate the items in the Telerik ToolBar for Blazor. Depending on the needs of your application you can use of the following, or a combination of them:

  • ToolBarSeparator - to separate two items with a solid line you should add the <ToolBarSeparator> tag between them.

  • ToolBarSpacer - defines empty space in the toolbar which separates the items. The space between the items is automatically calculated to fit the width of the ToolBar. For example, one spacer in the middle of the items will push the second part of items to the right-hand side of the toolbar.

  • ToolBarButtonGroup - you can combine built-in buttons into groups and those groups also add some spacing and separation around themselves. You can read more about them in the Built-in Tools - ToolBarButtonGroup section.

Use ToolBarButtonGroup, ToolBarSeparator and ToolBarSpace to separate items in the ToolBar

toolbar spacers

@* Use the ToolBarSpacer to add space between the button group and the rest and the separator to separate the toggle button and the undo button *@

<TelerikToolBar>
    <ToolBarButtonGroup>
        <ToolBarButton Icon="bold">Bold</ToolBarButton>
        <ToolBarButton Icon="italic">Italic</ToolBarButton>
        <ToolBarButton Icon="underline">Underline</ToolBarButton>
    </ToolBarButtonGroup>
    <ToolBarSpacer />
    <ToolBarToggleButton @bind-Selected="@Selected">Toggle Button</ToolBarToggleButton>
    <ToolBarSeparator />
    <ToolBarButton Icon="undo">Undo</ToolBarButton>
</TelerikToolBar>


@code {
    public bool Selected { get; set; } = true;
}

See Also

In this article
Not finding the help you need? Improve this article