Blazorise Ribbon API

Build a ribbon that helps users find the commands they need for editing documents, formatting content, and managing files.

For examples and usage guidance, see the Ribbon documentation.

API

Parameters

Ribbon

ParameterDefaultType
ActiveContextualGroupsArray.Empty<string>()IReadOnlyList<string>

Identifies the contextual groups whose tabs are currently available.
Bind this collection to the application's current editing context. Multiple groups may be active together. Defaults to an empty collection, leaving all contextual groups hidden.
Animatedfalsebool

Enables slide transitions when switching tabs.
The direction follows the new tab's position relative to the current tab. The initial render is not animated. Defaults to false.
AnimationDuration200int

Controls the tab transition duration in milliseconds.
Applies when Animated is enabled. Zero or a negative value disables transitions. Defaults to 200.
ApplicationTabnullRenderFragment

Defines the application entry preceding the tab headings, such as File.
Use RibbonApplicationMenu for a dropdown menu or RibbonApplicationButton to open backstage or invoke a command.
Collapsedfalsebool

Hides the command panels while keeping the tab strip available.
Selecting a tab expands the ribbon. Defaults to false.
CollapseLabel—string

Specifies the accessible label of the collapse button when it will collapse the ribbon.
DisplayModeRibbonDisplayMode.ClassicRibbonDisplayMode

Controls whether commands use the full group layout or a single compact row. Defaults to Classic.
Possible values:ClassicSimplified
ExpandLabel—string

Specifies the accessible label of the collapse button when it will expand the ribbon.
Label—string

Specifies the accessible name announced for the tab strip.
LocalizersnullRibbonLocalizers

Overrides translations for built-in ribbon labels without changing application command text.
QuickAccessLabel—string

Specifies the accessible name announced for the quick access commands.
QuickAccessToolbarnullRenderFragment

Defines frequently used commands displayed above the tab strip, such as Save, Undo, and Redo.
RenderModeDefaultTabsRenderMode

Controls when tab content is created and whether it is retained after switching tabs.
Possible values:DefaultLazyLoadLazyReload
Defaults to Default, which renders all panels. Use LazyLoad to retain visited panels or LazyReload to render only the active panel.
RibbonTabsnullRenderFragment

Defines ordinary RibbonTab components and named RibbonContextualTabs collections.
SelectedTab—string

Specifies the Name of the selected tab.
If unavailable, the last available regular tab is restored, or the first enabled, visible tab is selected.
ShowCollapseButtontruebool

Displays a button for collapsing or expanding the command panels.
TabStripToolbarnullRenderFragment

Defines commands displayed after the tab headings, such as Share or Comments.

RibbonTab

ParameterDefaultType
ChildContentnullRenderFragment

Defines the command panel displayed when this tab is selected, typically containing RibbonGroup components.
Disabledfalsebool

Prevents selecting the tab while keeping its heading visible.
HeaderContentnullRenderFragment

Defines custom content for the tab heading, replacing Text.
Name—string

Identifies the tab for selection and binding through SelectedTab.
Must be non-empty and unique within the containing ribbon.
Order0int

Controls heading order, fallback selection, and animation direction. Lower values appear first. Defaults to zero.
Applies across regular and contextual tabs. Equal values retain registration order. Bind this parameter to the current index when inserting or reordering dynamic tabs.
Text—string

Specifies the tab heading displayed when HeaderContent is not supplied.
Visibletruebool

Controls whether the tab heading is shown and the tab can be selected.
Contextual groups also control whether their member tabs are available. Defaults to true.

RibbonContextualTabs

ParameterDefaultType
ChildContentnullRenderFragment

Defines the tabs available while this context is active.
ColorPrimaryColor

Specifies the shared color of the contextual tab headings and selected underline.
Defaults to Primary.
Name—string

Identifies the context activated through ActiveContextualGroups.
Must be non-empty and unique within the containing ribbon.
SelectOnShowfalsebool

Selects the group's first enabled, visible tab when the context becomes active.
Selecting the tab also expands the ribbon. Defaults to false.

RibbonGroup

ParameterDefaultType
ChildContentnullRenderFragment

Defines the grouped commands. Use RibbonColumn to stack commands or RibbonRow for rows of commands and inputs.
LauncherDisabledfalsebool

Prevents activating the group launcher.
LauncherLabel—string

Specifies the accessible name of the group launcher. When omitted, uses Text.
LayoutRibbonGroupLayout.ColumnsRibbonGroupLayout

Controls how commands, columns, and rows are arranged in classic mode.
Possible values:ColumnsRows
Simplified mode always arranges commands horizontally. Defaults to Columns.
ShowLauncherfalsebool

Displays a launcher beside the group caption in classic mode, allowing access to additional options.
Text—string

Specifies the group caption displayed below its commands in classic mode and used as the group's accessible name.

RibbonColumn

ParameterDefaultType
ChildContentnullRenderFragment

Defines commands stacked beside large commands in classic mode. These commands form a horizontal row in simplified mode.

RibbonRow

ParameterDefaultType
ChildContentnullRenderFragment

Defines commands and inputs arranged horizontally within this row.

RibbonButton

ParameterDefaultType
ChildContentnullRenderFragment

Defines the command content.
Buttons and color pickers use this content instead of the default command presentation. Dropdowns and split buttons use it for menu content, such as RibbonDropdownItem and RibbonDropdownDivider.
ColorDefaultColor

Selects the color used for the command and its interaction states. Default commands use the body text color.
Disabledfalsebool

Prevents activating the command or opening its menu.
Iconnullobject

Specifies the command icon. Accepts an icon name supported by the configured icon provider.
SizeMediumRibbonItemSize

Controls the placement of the command icon and label, independently of font size.
Possible values:SmallMediumLarge
Large commands become medium commands in simplified mode. Defaults to Medium.
Text—string

Specifies the command label and accessible name.
Small commands with an icon omit the visible label.

RibbonToggleButton

ParameterDefaultType
Checkedfalsebool

Controls the command's checked state and active appearance.
Clicking the command toggles this value. Defaults to false.
ChildContentnullRenderFragment

Defines the command content.
Buttons and color pickers use this content instead of the default command presentation. Dropdowns and split buttons use it for menu content, such as RibbonDropdownItem and RibbonDropdownDivider.
ColorDefaultColor

Selects the color used for the command and its interaction states. Default commands use the body text color.
Disabledfalsebool

Prevents activating the command or opening its menu.
Iconnullobject

Specifies the command icon. Accepts an icon name supported by the configured icon provider.
SizeMediumRibbonItemSize

Controls the placement of the command icon and label, independently of font size.
Possible values:SmallMediumLarge
Large commands become medium commands in simplified mode. Defaults to Medium.
Text—string

Specifies the command label and accessible name.
Small commands with an icon omit the visible label.

RibbonSplitButton

ParameterDefaultType
ButtonContentnullRenderFragment

Defines custom content for the default action button, replacing its default icon and label.
ChildContentnullRenderFragment

Defines the command content.
Buttons and color pickers use this content instead of the default command presentation. Dropdowns and split buttons use it for menu content, such as RibbonDropdownItem and RibbonDropdownDivider.
ColorDefaultColor

Selects the color used for the command and its interaction states. Default commands use the body text color.
DirectionDownDirection

Controls the direction in which the menu opens. Defaults to Down.
Possible values:DefaultDownUpEndStart
Disabledfalsebool

Prevents activating the command or opening its menu.
Iconnullobject

Specifies the command icon. Accepts an icon name supported by the configured icon provider.
MenuLabel—string

Specifies the accessible name of the menu toggle. When omitted, uses Text.
SizeMediumRibbonItemSize

Controls the placement of the command icon and label, independently of font size.
Possible values:SmallMediumLarge
Large commands become medium commands in simplified mode. Defaults to Medium.
Text—string

Specifies the command label and accessible name.
Small commands with an icon omit the visible label.
Visiblefalsebool

Controls whether the command's menu is open.

RibbonDropdown

ParameterDefaultType
ButtonContentnullRenderFragment

Defines custom content for the menu trigger, replacing its default icon and label.
ChildContentnullRenderFragment

Defines the command content.
Buttons and color pickers use this content instead of the default command presentation. Dropdowns and split buttons use it for menu content, such as RibbonDropdownItem and RibbonDropdownDivider.
ColorDefaultColor

Selects the color used for the command and its interaction states. Default commands use the body text color.
DirectionDownDirection

Controls the direction in which the menu opens. Defaults to Down.
Possible values:DefaultDownUpEndStart
Disabledfalsebool

Prevents activating the command or opening its menu.
Iconnullobject

Specifies the command icon. Accepts an icon name supported by the configured icon provider.
SizeMediumRibbonItemSize

Controls the placement of the command icon and label, independently of font size.
Possible values:SmallMediumLarge
Large commands become medium commands in simplified mode. Defaults to Medium.
Text—string

Specifies the command label and accessible name.
Small commands with an icon omit the visible label.
Visiblefalsebool

Controls whether the command's menu is open.

RibbonDropdownItem

ParameterDefaultType
Activefalsebool

Highlights the menu command as active without invoking it.
ChildContentnullRenderFragment

Defines custom menu command content, replacing the default icon and label.
CloseParentDropdownstruebool

Closes the containing dropdown and its ancestor dropdowns when the command is selected.
Disabledfalsebool

Prevents selecting the menu command while keeping it visible.
Iconnullobject

Specifies the icon displayed beside the label. Accepts an icon name supported by the configured icon provider.
Text—string

Specifies the menu command label displayed when ChildContent is not supplied.

RibbonColorPicker

ParameterDefaultType
AutomaticText—string

Provides the Automatic command label.
ChildContentnullRenderFragment

Defines the command content.
Buttons and color pickers use this content instead of the default command presentation. Dropdowns and split buttons use it for menu content, such as RibbonDropdownItem and RibbonDropdownDivider.
ColorDefaultColor

Selects the color used for the command and its interaction states. Default commands use the body text color.
DirectionDownDirection

Controls the direction in which the preset menu opens. Defaults to Down.
Possible values:DefaultDownUpEndStart
Disabledfalsebool

Prevents activating the command or opening its menu.
HideAfterPaletteSelecttruebool

Automatically closes the color menu after selecting a preset.
Iconnullobject

Specifies the command icon. Accepts an icon name supported by the configured icon provider.
LocalizersnullRibbonColorPickerLocalizers

Overrides translations for palette headings and built-in color commands.
MoreColorsText—string

Provides the command label used to open the full picker.
NoColorText—string

Provides the command label used to clear the selected color.
Palettenullstring[]

Supplies explicit primary colors in row order, replacing the predefined palette.
A null value uses PalettePreset. An empty array hides the primary grid. Supplying explicit colors also removes the preset's second grid unless StandardPalette is supplied.
PaletteColumns10int

Controls the maximum number of swatches per row in both grids. Defaults to ten.
The supported range is one through twelve. Palettes with fewer colors use fewer columns.
PalettePresetExtendedRibbonColorPalette

Selects the predefined colors used when no explicit palette is supplied.
Possible values:SimpleStandardExtended
Defaults to Extended, which includes tint and shade rows and a standard-color section.
PaletteText—string

Provides a custom heading and accessible name for the primary swatch grid.
A null value uses the preset's heading, or Colors for an explicit palette. An empty string hides the heading.
PickerLocalizernullTextLocalizerHandler

Provides custom localization for color picker text, overriding the default translations.
ReadOnlyfalsebool

Prevents changing the selected color.
ShowAutomaticfalsebool

Displays the Automatic command above the palettes.
ShowMoreColorstruebool

Displays the command that opens the full picker for a custom color.
ShowNoColortruebool

Displays the No Color command in the palette menu.
Selecting No Color clears Value to null and notifies ValueChanged.
ShowPalettetruebool

Displays the preset swatch grids in the color menu.
ShowValuefalsebool

Displays the selected color value beside the command preview when the picker is closed.
Defaults to false to keep ribbon commands compact.
SizeMediumRibbonItemSize

Controls the placement of the command icon and label, independently of font size.
Possible values:SmallMediumLarge
Large commands become medium commands in simplified mode. Defaults to Medium.
StandardPalettenullstring[]

Supplies explicit colors for a second swatch grid beneath the primary palette.
A null value uses the standard-color section of the Extended preset when no explicit primary palette is supplied. An empty array hides this section.
StandardPaletteText—string

Provides the heading and accessible name of the second swatch grid.
Text—string

Specifies the command label and accessible name.
Small commands with an icon omit the visible label.
Value—string

Specifies the selected color as a string supported by ColorPicker.
Visiblefalsebool

Controls whether the preset color menu is open.

RibbonGallery

ParameterDefaultType
ChildContentnullRenderFragment

Defines the selectable previews using RibbonGalleryItem components.
Disabledfalsebool

Prevents selecting any preview in the gallery.
FooterContentnullRenderFragment

Defines optional actions displayed below the previews, such as managing or creating styles.
SelectedValue—string

Specifies the Value of the selected preview.
Text—string

Specifies the accessible name of the gallery, such as Document styles.

RibbonGalleryItem

ParameterDefaultType
ChildContentnullRenderFragment

Defines the visual preview displayed above the caption, such as formatted sample text.
Disabledfalsebool

Prevents selecting this preview.
The containing gallery can also disable all previews. Defaults to false.
Text—string

Specifies the caption displayed below the preview and used as its accessible name and tooltip.
Value—string

Identifies the value selected when this preview is activated and compared with SelectedValue.

RibbonApplicationButton

ParameterDefaultType
ChildContentnullRenderFragment

Defines custom application button content, replacing the default label.
Disabledfalsebool

Prevents activating the application command.
Expandedfalsebool

Controls whether independently associated backstage or menu content is expanded.
Bind this parameter to standalone backstage visibility. Inside a workspace, expansion is owned by the workspace. Leave unset for a command without expandable content. Defaults to false.
Text—string

Specifies the application command label and accessible name, such as File.

RibbonApplicationMenu

ParameterDefaultType
ButtonContentnullRenderFragment

Defines custom content for the application menu button, replacing the visible Text label.
ChildContentnullRenderFragment

Defines the application menu content.
Use RibbonApplicationMenuItem for commands and RibbonApplicationMenuDivider for separators. Nest menu items to create submenus, such as Save As.
DirectionDownDirection

Controls the direction in which the application menu opens. Defaults to Down.
Possible values:DefaultDownUpEndStart
Disabledfalsebool

Prevents opening the application menu.
ShowToggleIconfalsebool

Displays the dropdown indicator beside the application menu heading.
Text—string

Specifies the application menu label and accessible name, such as File.
Visiblefalsebool

Controls whether the application menu is open.

RibbonApplicationMenuItem

ParameterDefaultType
ChildContentnullRenderFragment

Defines the submenu content.
Use nested RibbonApplicationMenuItem components to define submenu commands. When supplied, this entry opens a submenu instead of invoking its click callback.
Disabledfalsebool

Prevents activating the command or opening its submenu.
Iconnullobject

Specifies the icon displayed beside the label. Accepts an icon name supported by the configured icon provider.
Text—string

Specifies the label of the application command or submenu.

RibbonWorkspace

ParameterDefaultType
BackstageVisiblefalsebool

Controls whether the workspace's backstage is shown.
ChildContentnullRenderFragment

Defines the ribbon, document content, and optional backstage in their natural layout.

RibbonBackstage

ParameterDefaultType
BackText—string

Specifies the Back button text and accessible name.
ChildContentnullRenderFragment

Defines backstage pages and commands using RibbonBackstageItem components.
Fullscreenfalsebool

Covers the viewport instead of the containing workspace or positioned ancestor.
Label—string

Specifies the accessible name announced for the backstage surface.
LocalizersnullRibbonBackstageLocalizers

Overrides translations for the backstage surface, navigation, and Back command.
NavigationLabel—string

Specifies the accessible name announced for backstage navigation.
RenderModeLazyLoadTabsRenderMode

Controls when backstage page content is created and retained.
Possible values:DefaultLazyLoadLazyReload
Defaults to LazyLoad, which preserves visited pages. Use Default to render all pages or LazyReload to retain only the selected page content.
SelectedItem—string

Specifies the Name of the selected page.
If unavailable, the first enabled, visible entry with page content is selected.
Visiblefalsebool

Controls whether backstage is shown.
Opening backstage moves keyboard focus to the Back button. Defaults to false. Inside a RibbonWorkspace, use BackstageVisible instead.

RibbonBackstageItem

ParameterDefaultType
ChildContentnullRenderFragment

Defines the page displayed when this entry is selected. Without content, the entry invokes its command without selecting a page.
Disabledfalsebool

Prevents selecting the page or activating the command while keeping the navigation entry visible.
Iconnullobject

Specifies the icon displayed beside the label. Accepts an icon name supported by the configured icon provider.
Name—string

Identifies the entry for page selection through SelectedItem.
Must be non-empty and unique within the containing backstage.
Order0int

Controls navigation and fallback selection order. Lower values appear first. Defaults to zero.
Equal values retain registration order. Bind this parameter to the current index when inserting or reordering dynamic items.
Text—string

Specifies the label displayed in backstage navigation.
Visibletruebool

Controls whether the navigation entry is shown and can be activated.

Events

Ribbon

EventType
ActiveContextualGroupsChangedEventCallback<IReadOnlyList<string>>

Occurs when an imperative context change updates the active group names.
CollapsedChangedEventCallback<bool>

Occurs when the collapsed state changes.
SelectedTabChangedEventCallback<string>

Occurs when the selected tab changes.

RibbonGroup

EventType
LauncherClickedEventCallback<MouseEventArgs>

Occurs when the group launcher is activated. Use this callback to display a dialog or additional options.

RibbonButton

EventType
ClickedEventCallback<MouseEventArgs>

Occurs when the enabled command is activated. Use this callback to perform the command's action.

RibbonToggleButton

EventType
CheckedChangedEventCallback<bool>

Occurs after activation toggles Checked and before the command click callback is invoked.
ClickedEventCallback<MouseEventArgs>

Occurs when the enabled command is activated. Use this callback to perform the command's action.

RibbonSplitButton

EventType
ClickedEventCallback<MouseEventArgs>

Occurs when the default action button is activated. Activating the menu toggle opens the menu instead.
VisibleChangedEventCallback<bool>

Occurs when the menu opens or closes. Supplies its visibility for two-way binding.

RibbonDropdown

EventType
VisibleChangedEventCallback<bool>

Occurs when the menu opens or closes. Supplies its visibility for two-way binding.

RibbonDropdownItem

EventType
ClickedEventCallback

Occurs when the enabled menu command is selected.

RibbonColorPicker

EventType
AutomaticClickedEventCallback

Occurs when Automatic is selected, allowing the application to apply its default color.
This event does not assign a color value. The application owns the meaning of Automatic.
ValueChangedEventCallback<string>

Occurs when the selected color changes. Supplies the new color value for two-way binding.
VisibleChangedEventCallback<bool>

Occurs when the preset menu opens or closes, supporting two-way binding.

RibbonGallery

EventType
SelectedValueChangedEventCallback<string>

Occurs when a different gallery value is selected. Supplies the selected value for two-way binding.

RibbonApplicationButton

EventType
ClickedEventCallback<MouseEventArgs>

Occurs when the application button is activated, after any backstage or expansion change.
ExpandedChangedEventCallback<bool>

Occurs when a standalone application button toggles its expanded state.

RibbonApplicationMenu

EventType
VisibleChangedEventCallback<bool>

Occurs when the application menu opens or closes. Supplies the open state for two-way binding.

RibbonApplicationMenuItem

EventType
ClickedEventCallback

Occurs when an enabled command without children is selected. Entries with children open their submenu instead.

RibbonWorkspace

EventType
BackstageVisibleChangedEventCallback<bool>

Occurs when a workspace command or backstage requests a visibility change.

RibbonBackstage

EventType
ClosedEventCallback

Occurs after backstage is hidden. Use this callback to focus an application control when needed.
OpenedEventCallback

Occurs after backstage is shown and the Back button receives focus.
SelectedItemChangedEventCallback<string>

Occurs when a different backstage page is selected. Supplies the page name for two-way binding.
VisibleChangedEventCallback<bool>

Occurs when standalone backstage changes visibility through its controls or public methods. Inside a workspace, visibility changes are reported through BackstageVisibleChanged.

RibbonBackstageItem

EventType
ClickedEventCallback<MouseEventArgs>

Occurs when the entry is activated, after selecting its page when present.
Commands do not close backstage automatically; close it from this callback when needed.

Methods

Ribbon

MethodReturnParameters
SelectTabTaskstring name

Selects an enabled, visible tab and expands the command surface.
SetActiveContextualGroupsTaskstring[] names

Activates the named contextual groups and hides the others.
Updates ActiveContextualGroups and invokes ActiveContextualGroupsChanged so bound application state stays synchronized.
SetCollapsedTaskbool collapsed

Sets the collapsed state and notifies the bound application.

RibbonButton

MethodReturnParameters
FocusTaskbool scrollToElement

Moves keyboard focus to the command.

RibbonToggleButton

MethodReturnParameters
FocusTaskbool scrollToElement

Moves keyboard focus to the command.

RibbonSplitButton

MethodReturnParameters
FocusTaskbool scrollToElement

Moves keyboard focus to the menu toggle.
HideTask—

Closes the menu.
ShowTask—

Opens the menu when the ribbon command is enabled.

RibbonDropdown

MethodReturnParameters
FocusTaskbool scrollToElement

Moves keyboard focus to the menu toggle.
HideTask—

Closes the menu.
ShowTask—

Opens the menu when the ribbon command is enabled.

RibbonColorPicker

MethodReturnParameters
FocusTaskbool scrollToElement

Moves keyboard focus to the color menu toggle.
HideTask—

Closes the preset menu and the full color picker.
ShowTask—

Opens the preset color menu when the command is enabled and editable.

RibbonGallery

MethodReturnParameters
SelectValueTaskstring value

Selects a gallery value through the same path as user interaction.

RibbonApplicationButton

MethodReturnParameters
FocusTaskbool scrollToElement

Moves keyboard focus to the application button.

RibbonApplicationMenu

MethodReturnParameters
FocusTaskbool scrollToElement

Moves keyboard focus to the application menu trigger.
HideTask—

Closes the application menu.
ShowTask—

Opens the application menu when enabled.

RibbonBackstage

MethodReturnParameters
HideTask—

Hides backstage while preserving its selection and visited pages.
SelectItemTaskstring name

Selects an available page without changing backstage visibility.
ShowTask—

Shows backstage through the visibility notification path.
On this page