Ribbon

RibbonControl

Organize many commands into tabs and titled groups, Office style.

Overview

RibbonControl is a Blazor ribbon: an Office-style command bar with tabs across the top and titled groups of large and small buttons in each. Use it when a screen has more commands than a toolbar can hold, such as editing a booking; only the open tab's groups are shown, so the bar stays compact. The buttons hold no state, so your page decides what each does, when it is disabled and how it looks pressed.

Examples

#A booking desk ribbon

Build the booking from the ribbon: each Trip button adds its line once and then turns Disabled, and the total grows; Hold is a toggle, and Cancel disables what no longer applies. Email opens a DropDownContent menu, and one group holds check boxes instead of buttons, which show or hide the line prices and the total. Hide the ribbon with the arrow on the right or a double-click on a tab; Reports is a Disabled tab.

Booking
LIS-0001 ยท Lisbon city break for Albus Door Open
  • No lines yet; add them on the Trip tab.
Nothing sent yetTotal $0

#Toggles, disabled groups and hidden tabs

Pick a traveler and a tab named after them joins the strip through Visible. Its buttons are toggles through Pressed, and the badges on the traveler's row follow; confirm the traveler and two groups turn Disabled.

Kyoto Classic, four travelers
  • Window seatOpen
  • Open
  • VegetarianOpen
  • Confirmed
Pick a traveler to add their tab.

Documentation

ParameterTypeDefaultDescription
ChildContentRenderFragment?nullThe RibbonTabs.
CssClassstring""Added to the outer fx-ribbon element.
CollapsibleboolfalseShows a button at the end of the strip that hides and shows the body; a double-click on a tab does the same.
CollapsedboolfalseWhether the body is hidden. Two-way with @bind-Collapsed; read only when Collapsible is true. Opening a tab shows the body again.
CollapsedChangedEventCallback<bool>โ€”Fires when the user hides or shows the body.

Tabs join the strip in the order they first render: there is no parameter or method to open a tab from code, and a tab removed from the page later keeps its header, so hide a tab with Visible instead. The four components accept no attributes beyond the parameters listed here.

An unhandled error has occurred. Reload ๐Ÿ—™

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.