Button Group
A container that groups related buttons together with consistent styling. Set the Control the size of buttons using the Nest The Create a split button group by adding two buttons separated by a Wrap an input component with buttons. Wrap an Create a split button group with a Pair with a Use with a <RzButtonGroup>
<RzButton Outline>Button 1</RzButton>
<RzButton Outline>Button 2</RzButton>
</RzButtonGroup>Orientation property to change the button group layout.<RzButtonGroup Orientation="Orientation.Vertical">
<RzButton Outline>Button 1</RzButton>
<RzButton Outline>Button 2</RzButton>
</RzButtonGroup>Size property on individual buttons.<RzButtonGroup>
<RzButton Outline Size="Size.Small">Small</RzButton>
<RzButton Outline Size="Size.Small">Small</RzButton>
<RzButton Outline Size="Size.Small">Small</RzButton>
</RzButtonGroup>RzButtonGroup components to create button groups with spacing.<RzButtonGroup>
<RzButtonGroup>
<RzButton Outline>Copy</RzButton>
<RzButton Outline>Paste</RzButton>
</RzButtonGroup>
<RzButtonGroup>
<RzButton Outline>
<Blazicon Svg="MdiIcon.FormatBold" />
</RzButton>
<RzButton Outline>
<Blazicon Svg="MdiIcon.FormatItalic" />
</RzButton>
<RzButton Outline>
<Blazicon Svg="MdiIcon.FormatUnderline" />
</RzButton>
</RzButtonGroup>
</RzButtonGroup>ButtonGroupSeparator component visually divides buttons within a group. Useful for variants other than outline.<RzButtonGroup>
<RzButton Variant="ThemeVariant.Secondary">Item 1</RzButton>
<ButtonGroupSeparator />
<RzButton Variant="ThemeVariant.Secondary">Item 2</RzButton>
</RzButtonGroup>ButtonGroupSeparator.<RzButtonGroup>
<RzButton Variant="ThemeVariant.Primary">Action</RzButton>
<ButtonGroupSeparator />
<RzButton Variant="ThemeVariant.Primary" class="w-9 px-0">
<Blazicon Svg="MdiIcon.ChevronDown" />
</RzButton>
</RzButtonGroup><RzButtonGroup>
<RzInputText For="@(() => _formModel.SearchValue)" Placeholder="Type something..." class="w-[200px]" />
<RzButton Outline class="w-9 px-0">
<Blazicon Svg="MdiIcon.Magnify" />
</RzButton>
</RzButtonGroup>RzInputGroup component to create complex input layouts.<RzButtonGroup class="[--radius:9999rem]" x-data="{ voiceEnabled: false }">
<RzButtonGroup>
<RzButton Variant="ThemeVariant.Default" Outline="true" class="size-9 px-0">
<Blazicon Svg="Lucide.Plus" />
</RzButton>
</RzButtonGroup>
<RzButtonGroup>
<EditForm Model="_chatModel">
<RzInputGroup>
<InputGroupInput For="@(() => _chatModel.Message)"
Placeholder="Send a message..."
x-bind:placeholder="voiceEnabled ? 'Record and send audio...' : 'Send a message...'"
x-bind:disabled="voiceEnabled" />
<InputGroupAddon Align="InputGroupAddonAlign.InlineEnd">
<InputGroupButton Size="InputGroupButtonSize.IconExtraSmall"
type="button"
x-on:click="voiceEnabled = !voiceEnabled"
x-bind:aria-pressed="voiceEnabled"
x-bind:data-active="voiceEnabled"
class="data-[active=true]:bg-orange-100 data-[active=true]:text-orange-700 dark:data-[active=true]:bg-orange-800 dark:data-[active=true]:text-orange-100 transition-colors">
<Blazicon Svg="@Lucide.AudioLines" />
</InputGroupButton>
</InputGroupAddon>
</RzInputGroup>
</EditForm>
</RzButtonGroup>
</RzButtonGroup>
@code {
private ChatModel _model = new();
private class ChatModel
{
public string Message { get; set; } = "";
}
}RzDropdownMenu.<RzButtonGroup>
<RzButton Variant="ThemeVariant.Primary">Profile</RzButton>
<ButtonGroupSeparator />
<RzDropdownMenu>
<DropdownMenuTrigger AsChild>
<RzButton Variant="ThemeVariant.Primary" class="w-9 px-0">
<Blazicon Svg="MdiIcon.ChevronDown" />
</RzButton>
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem>Settings</DropdownMenuItem>
<DropdownMenuItem>Messages</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem>Logout</DropdownMenuItem>
</DropdownMenuContent>
</RzDropdownMenu>
</RzButtonGroup>RzNativeSelect component.<RzButtonGroup>
<ButtonGroupText>Format</ButtonGroupText>
<RzNativeSelect For="@(() => _formModel.SearchValue)" class="w-[150px]">
<option value="mp4">MP4</option>
<option value="mov">MOV</option>
<option value="avi">AVI</option>
</RzNativeSelect>
</RzButtonGroup>RzPopover component.<RzButtonGroup>
<RzButton Variant="ThemeVariant.Secondary">Settings</RzButton>
<ButtonGroupSeparator />
<RzPopover>
<PopoverTrigger AsChild>
<RzButton Variant="ThemeVariant.Secondary" class="w-9 px-0">
<Blazicon Svg="MdiIcon.Cog" />
</RzButton>
</PopoverTrigger>
<PopoverContent>
<div class="grid gap-4">
<div class="space-y-2">
<h4 class="font-medium leading-none">Dimensions</h4>
<p class="text-sm text-muted-foreground">Set the dimensions for the layer.</p>
</div>
</div>
</PopoverContent>
</RzPopover>
</RzButtonGroup>