Skip to main content

Ribbon

Ribbon is a horizontal scrolling button list component. See the example code for usage. Ribbon operates like the Tab component where the activeButtonId attribute is used to specify the selected button. The id attribute of the button must match the activeButtonId in order for the button to be selected.

Result
Loading...
Live Editor

Custom Icon

You can use the renderIcon prop to provide a custom icon SVG.

Result
Loading...
Live Editor

Draggable and Edit Mode

The DragAndDropRibbon and DragAndDropRibbonButton can be used to create editable Ribbons when placed in Edit Mode. Tiles become sortable and removable and the onSort prop is called with the new order of the tiles.

Note: The immediate children of the DragAndDropRibbon must be DragAndDropRibbonButtons. Using a wrapper around the child elements will break the component.

Result
Loading...
Live Editor

Adding RibbonButtons with animations

It's possible to animate RibbonButtons when added or removed from the Ribbon with the animate prop. When adding a button setting the animate prop to in will animate the button in from the top, calling the onEntered prop when it is done. When removing a button set the animate prop to out and the button will animate out from button to top, then call the onExited prop when it is done so the item can be removed from state.

Result
Loading...
Live Editor

Props

Ribbon

Ribbon.Button

Ribbon.DragAndDropRibbon

Ribbon.DragAndDropRibbonButton