Button Group

Buttons joined into one control, with only the outer corners rounded.

Installation

bash
shellui-native add button-group

Platforms: MAUI · Avalonia. Also installs button.

Usage

Basic

Rendered with ShellUI for Blazor
<ui:ButtonGroup>
    <ui:Button Text="Day" Variant="Outline" />
    <ui:Button Text="Week" Variant="Outline" />
    <ui:Button Text="Month" Variant="Outline" />
</ui:ButtonGroup>

<ui:ButtonGroup>
    <ui:Button Text="Save" />
    <ui:Button Icon="ChevronDown" Size="Icon" />
</ui:ButtonGroup>
Avalonia, running in your browser

Each button keeps its own Clicked. Neighbouring borders overlap, so Outline buttons share one line between them.

Vertical

Rendered with ShellUI for Blazor
<ui:ButtonGroup Orientation="Vertical">
    <ui:Button Text="Top" Variant="Outline" />
    <ui:Button Text="Middle" Variant="Outline" />
    <ui:Button Text="Bottom" Variant="Outline" />
</ui:ButtonGroup>
Avalonia, running in your browser

Stacked buttons share the widest one's width.

Updating an older project

ButtonGroup needs the Button that ships with it. If button is already in your project from an older CLI version, update it first:

bash
shellui-native update button

update rewrites Button.cs, so reapply any edits you made to it.

MAUI and Avalonia

On Avalonia the buttons are collected in Items.

API

XAML children go to Items.

Property Type Default Description
Orientation StackOrientation (MAUI) · Orientation (Avalonia) Horizontal Horizontal or Vertical.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.