Syncfusion Vue Ribbon Component
The Syncfusion Vue Ribbon component provides a modern, Office-style command interface that organizes application commands into a hierarchy of tabs, groups, and collections. It supports multiple layouts, rich item types, dynamic resizing, and advanced features like file menus, backstage views, and contextual tabs.
Component Overview
Key Features:
- Hierarchical Structure: Tabs → Groups → Collections → Items
- 8 Built-in Item Types: Button, CheckBox, DropDown, SplitButton, ComboBox, ColorPicker, GroupButton, Gallery
- Two Layout Modes: Classic (multi-row) and Simplified (single-row)
- Advanced Menus: File Menu and Backstage View
- Contextual Tabs: Dynamic tabs based on context
- Responsive Behavior: Automatic resizing with overflow handling
- Rich Customization: Themes, RTL, localization, templates
Documentation and Navigation Guide
Getting Started and Setup
📄 Read: references/getting-started.md
- Installing the
@syncfusion/ej2-vue-ribbon package
- Importing and registering Ribbon components and directives
- Setting up CSS theme imports
- Module injection for advanced features (FileMenu, ColorPicker, etc.)
- Creating a basic ribbon with tabs, groups, and items
- Minimal working example
- First render initialization
Ribbon Structure: Tabs, Groups, and Collections
📄 Read: references/tabs-and-groups.md
- Understanding the ribbon hierarchy (Tabs → Groups → Collections → Items)
- Adding tabs with the
header property
- Creating groups and configuring headers
- Group orientation (Row vs Column)
- Group icons and launcher icons
- Collapsible groups and priority order
- Group overflow behavior
- Collections within groups
Built-in Item Types
📄 Read: references/ribbon-items.md
- Overview of 8 built-in item types
- Button items: Toggle buttons, icons, content
- CheckBox items: Checked state, label positioning
- DropDown items: Target, popup, customization
- SplitButton items: Primary action with dropdown
- ComboBox items: Filtering, sorting, data binding
- ColorPicker items: Value, palette configuration
- GroupButton items: Single/multiple selection modes
- Gallery items: Basic gallery integration (see gallery-items.md for details)
- Custom template items with
itemTemplate
- Display options (Classic, Simplified, Overflow)
- Enabling/disabling items
- Item sizing with
allowedSizes
Layouts and Responsive Behavior
📄 Read: references/layouts-and-resizing.md
- Classic layout (multi-row format)
- Simplified layout (single-row format)
- Setting
activeLayout property
- Item sizes: Large, Medium, Small
allowedSizes and automatic resizing
- Group orientation and constraints
- Minimized state with
isMinimized
- Layout switcher visibility
- Overflow popup handling
- Group overflow with
enableGroupOverflow
File Menu
📄 Read: references/file-menu.md
- Enabling file menu with
fileMenu property
- Menu visibility configuration
- Adding menu items with icons
- Submenu support
showItemOnClick behavior
- Custom header text
- File menu events (open, close, itemSelect)
- Module injection requirements
Backstage View
📄 Read: references/backstage.md
- Backstage view overview and use cases
- Configuring
backStageMenu property
- Adding backstage items with content
- Content templates for items
- Footer items with
isFooter
- Back button customization
- Width, height, and header settings
autoClose behavior
- Backstage events
Contextual Tabs
📄 Read: references/contextual-tabs.md
- When to use contextual tabs
- Adding contextual tabs with directives
- Setting
visible property
- Selecting tabs with
isSelected
- Dynamic management with
showTab and hideTab methods
- Use cases: table tools, image tools, chart tools
- Integration with user interactions
Gallery Items
📄 Read: references/gallery-items.md
- Gallery feature overview
RibbonGallerySettingsModel configuration
- Organizing items into groups
- Adding gallery items with content and icons
- Item count and height settings
- Popup dimensions (
popupHeight, popupWidth)
- Gallery selection events
- Item orientation (Row vs Column)
- Custom gallery templates
Events and Methods
📄 Read: references/events-and-methods.md
- Component events overview
- Tab events (
tabSelected, tabSelecting)
- Launcher icon click event
- Overflow popup events
- Expand/collapse events
- Layout switched event
- Methods for tabs:
addTab, removeTab, updateTab, selectTab
- Methods for groups:
addGroup, removeGroup, updateGroup
- Methods for items:
addItem, removeItem, updateItem, getItem
- Item state methods:
enableItem, disableItem, showItem, hideItem
refreshLayout method
Customization and Styling
📄 Read: references/customization.md
- CSS class customization with
cssClass
- Custom icon configuration
- Theme integration
- RTL support with
enableRtl
- Persistence with
enablePersistence
- Localization and
locale property
- Help pane template (
helpPaneTemplate)
- Tab animation settings
- KeyTips support (
enableKeyTips)
- Tooltips for items
- Width customization
- Custom styling examples
Quick Start Example
<template>
<ejs-ribbon :fileMenu="fileSettings">
<e-ribbon-tabs>
<e-ribbon-tab header="Home">
<e-ribbon-groups>
<!-- Clipboard Group -->
<e-ribbon-group header="Clipboard" groupIconCss="e-icons e-paste" :showLauncherIcon="true">
<e-ribbon-collections>
<e-ribbon-collection>
<e-ribbon-items>
<e-ribbon-item type="SplitButton" :allowedSizes="largeSize" :splitButtonSettings="pasteSettings">
</e-ribbon-item>
</e-ribbon-items>
</e-ribbon-collection>
<e-ribbon-collection>
<e-ribbon-items>
<e-ribbon-item type="Button" :buttonSettings="cutButton"></e-ribbon-item>
<e-ribbon-item type="Button" :buttonSettings="copyButton"></e-ribbon-item>
<e-ribbon-item type="Button" :buttonSettings="formatButton"></e-ribbon-item>
</e-ribbon-items>
</e-ribbon-collection>
</e-ribbon-collections>
</e-ribbon-group>
<!-- Font Group -->
<e-ribbon-group header="Font" orientation="Row" :enableGroupOverflow="true">
<e-ribbon-collections>
<e-ribbon-collection>
<e-ribbon-items>
<e-ribbon-item type="ComboBox" :comboBoxSettings="fontOptions"></e-ribbon-item>
<e-ribbon-item type="ComboBox" :comboBoxSettings="sizeOptions"></e-ribbon-item>
</e-ribbon-items>
</e-ribbon-collection>
<e-ribbon-collection>
<e-ribbon-items>
<e-ribbon-item type="Button" :allowedSizes="smallSize" :buttonSettings="boldButton"></e-ribbon-item>
<e-ribbon-item type="Button" :allowedSizes="smallSize" :buttonSettings="italicButton"></e-ribbon-item>
</e-ribbon-items>
</e-ribbon-collection>
</e-ribbon-collections>
</e-ribbon-group>
</e-ribbon-groups>
</e-ribbon-tab>
</e-ribbon-tabs>
</ejs-ribbon>
</template>
<script setup>
import { RibbonComponent as EjsRibbon, RibbonItemSize, RibbonFileMenu,
RibbonTabsDirective as ERibbonTabs, RibbonTabDirective as ERibbonTab,
RibbonGroupsDirective as ERibbonGroups, RibbonGroupDirective as ERibbonGroup,
RibbonCollectionsDirective as ERibbonCollections, RibbonCollectionDirective as ERibbonCollection,
RibbonItemsDirective as ERibbonItems, RibbonItemDirective as ERibbonItem
} from "@syncfusion/ej2-vue-ribbon";
import { provide } from "vue";
// Inject required modules
provide('ribbon', [RibbonFileMenu]);
// Define sizes
const largeSize = RibbonItemSize.Large;
const smallSize = RibbonItemSize.Small;
// File menu configuration
const fileSettings = {
visible: true,
menuItems: [
{ text: "New", iconCss: "e-icons e-file-new", id: "new" },
{ text: "Open", iconCss: "e-icons e-folder-open", id: "open" },
{ text: "Save", iconCss: "e-icons e-save", id: "save" }
]
};
// Button settings
const pasteSettings = {
iconCss: "e-icons e-paste",
content: "Paste",
items: [{ text: "Keep Source Format" }, { text: "Merge format" }, { text: "Keep text only" }]
};
const cutButton = { iconCss: "e-icons e-cut", content: "Cut" };
const copyButton = { iconCss: "e-icons e-copy", content: "Copy" };
const formatButton = { iconCss: "e-icons e-format-painter", content: "Format Painter" };
const boldButton = { iconCss: "e-icons e-bold", content: "Bold", isToggle: true };
const italicButton = { iconCss: "e-icons e-italic", content: "Italic", isToggle: true };
// ComboBox options
const fontOptions = {
dataSource: ["Arial", "Calibri", "Georgia", "Times New Roman", "Verdana"],
index: 1,
width: "150px"
};
const sizeOptions = {
dataSource: ["8", "10", "12", "14", "16", "18", "20"],
index: 2,
width: "65px"
};
</script>
<style>
@import "../node_modules/@syncfusion/ej2-material3-theme/styles/ribbon/index.css";
</style>
Common Patterns
Pattern 1: Document Editor Ribbon
// Tabs: Home, Insert, Design, Layout
// Groups: Clipboard, Font, Paragraph, Styles, Tables, Illustrations
// Items: Text formatting, styles gallery, insert options
Pattern 2: Responsive Layout with Overflow
<e-ribbon-group header="Commands" :enableGroupOverflow="true" orientation="Row">
<!-- Items automatically overflow to dropdown when space is limited -->
</e-ribbon-group>
Pattern 3: Contextual Tab for Selected Objects
<e-ribbon-contextual-tabs>
<e-ribbon-contextual-tab :visible="imageSelected" isSelected="true">
<e-ribbon-tabs>
<e-ribbon-tab header="Picture Format">
<!-- Image-specific tools -->
</e-ribbon-tab>
</e-ribbon-tabs>
</e-ribbon-contextual-tab>
</e-ribbon-contextual-tabs>
Pattern 4: Gallery-Based Selection
<e-ribbon-item type="Gallery" :gallerySettings="{
groups: [{
header: 'Styles',
items: [
{ content: 'Normal' },
{ content: 'Heading 1' },
{ content: 'Heading 2' }
]
}]
}"></e-ribbon-item>
1---2name: syncfusion-vue-ribbon3description: Syncfusion Vue Ribbon Component4---56# Syncfusion Vue Ribbon Component78The Syncfusion Vue Ribbon component provides a modern, Office-style command interface that organizes application commands into a hierarchy of tabs, groups, and collections. It supports multiple layouts, rich item types, dynamic resizing, and advanced features like file menus, backstage views, and contextual tabs.910## Component Overview1112**Key Features:**13- **Hierarchical Structure:** Tabs → Groups → Collections → Items14- **8 Built-in Item Types:** Button, CheckBox, DropDown, SplitButton, ComboBox, ColorPicker, GroupButton, Gallery15- **Two Layout Modes:** Classic (multi-row) and Simplified (single-row)16- **Advanced Menus:** File Menu and Backstage View17- **Contextual Tabs:** Dynamic tabs based on context18- **Responsive Behavior:** Automatic resizing with overflow handling19- **Rich Customization:** Themes, RTL, localization, templates2021## Documentation and Navigation Guide2223### Getting Started and Setup24📄 **Read:** [references/getting-started.md](references/getting-started.md)25- Installing the `@syncfusion/ej2-vue-ribbon` package26- Importing and registering Ribbon components and directives27- Setting up CSS theme imports28- Module injection for advanced features (FileMenu, ColorPicker, etc.)29- Creating a basic ribbon with tabs, groups, and items30- Minimal working example31- First render initialization3233### Ribbon Structure: Tabs, Groups, and Collections34📄 **Read:** [references/tabs-and-groups.md](references/tabs-and-groups.md)35- Understanding the ribbon hierarchy (Tabs → Groups → Collections → Items)36- Adding tabs with the `header` property37- Creating groups and configuring headers38- Group orientation (Row vs Column)39- Group icons and launcher icons40- Collapsible groups and priority order41- Group overflow behavior42- Collections within groups4344### Built-in Item Types45📄 **Read:** [references/ribbon-items.md](references/ribbon-items.md)46- Overview of 8 built-in item types47- **Button items:** Toggle buttons, icons, content48- **CheckBox items:** Checked state, label positioning49- **DropDown items:** Target, popup, customization50- **SplitButton items:** Primary action with dropdown51- **ComboBox items:** Filtering, sorting, data binding52- **ColorPicker items:** Value, palette configuration53- **GroupButton items:** Single/multiple selection modes54- **Gallery items:** Basic gallery integration (see gallery-items.md for details)55- Custom template items with `itemTemplate`56- Display options (Classic, Simplified, Overflow)57- Enabling/disabling items58- Item sizing with `allowedSizes`5960### Layouts and Responsive Behavior61📄 **Read:** [references/layouts-and-resizing.md](references/layouts-and-resizing.md)62- Classic layout (multi-row format)63- Simplified layout (single-row format)64- Setting `activeLayout` property65- Item sizes: Large, Medium, Small66- `allowedSizes` and automatic resizing67- Group orientation and constraints68- Minimized state with `isMinimized`69- Layout switcher visibility70- Overflow popup handling71- Group overflow with `enableGroupOverflow`7273### File Menu74📄 **Read:** [references/file-menu.md](references/file-menu.md)75- Enabling file menu with `fileMenu` property76- Menu visibility configuration77- Adding menu items with icons78- Submenu support79- `showItemOnClick` behavior80- Custom header text81- File menu events (open, close, itemSelect)82- Module injection requirements8384### Backstage View85📄 **Read:** [references/backstage.md](references/backstage.md)86- Backstage view overview and use cases87- Configuring `backStageMenu` property88- Adding backstage items with content89- Content templates for items90- Footer items with `isFooter`91- Back button customization92- Width, height, and header settings93- `autoClose` behavior94- Backstage events9596### Contextual Tabs97📄 **Read:** [references/contextual-tabs.md](references/contextual-tabs.md)98- When to use contextual tabs99- Adding contextual tabs with directives100- Setting `visible` property101- Selecting tabs with `isSelected`102- Dynamic management with `showTab` and `hideTab` methods103- Use cases: table tools, image tools, chart tools104- Integration with user interactions105106### Gallery Items107📄 **Read:** [references/gallery-items.md](references/gallery-items.md)108- Gallery feature overview109- `RibbonGallerySettingsModel` configuration110- Organizing items into groups111- Adding gallery items with content and icons112- Item count and height settings113- Popup dimensions (`popupHeight`, `popupWidth`)114- Gallery selection events115- Item orientation (Row vs Column)116- Custom gallery templates117118### Events and Methods119📄 **Read:** [references/events-and-methods.md](references/events-and-methods.md)120- Component events overview121- Tab events (`tabSelected`, `tabSelecting`)122- Launcher icon click event123- Overflow popup events124- Expand/collapse events125- Layout switched event126- Methods for tabs: `addTab`, `removeTab`, `updateTab`, `selectTab`127- Methods for groups: `addGroup`, `removeGroup`, `updateGroup`128- Methods for items: `addItem`, `removeItem`, `updateItem`, `getItem`129- Item state methods: `enableItem`, `disableItem`, `showItem`, `hideItem`130- `refreshLayout` method131132### Customization and Styling133📄 **Read:** [references/customization.md](references/customization.md)134- CSS class customization with `cssClass`135- Custom icon configuration136- Theme integration137- RTL support with `enableRtl`138- Persistence with `enablePersistence`139- Localization and `locale` property140- Help pane template (`helpPaneTemplate`)141- Tab animation settings142- KeyTips support (`enableKeyTips`)143- Tooltips for items144- Width customization145- Custom styling examples146147## Quick Start Example148149```vue150<template>151 <ejs-ribbon :fileMenu="fileSettings">152 <e-ribbon-tabs>153 <e-ribbon-tab header="Home">154 <e-ribbon-groups>155 <!-- Clipboard Group -->156 <e-ribbon-group header="Clipboard" groupIconCss="e-icons e-paste" :showLauncherIcon="true">157 <e-ribbon-collections>158 <e-ribbon-collection>159 <e-ribbon-items>160 <e-ribbon-item type="SplitButton" :allowedSizes="largeSize" :splitButtonSettings="pasteSettings">161 </e-ribbon-item>162 </e-ribbon-items>163 </e-ribbon-collection>164 <e-ribbon-collection>165 <e-ribbon-items>166 <e-ribbon-item type="Button" :buttonSettings="cutButton"></e-ribbon-item>167 <e-ribbon-item type="Button" :buttonSettings="copyButton"></e-ribbon-item>168 <e-ribbon-item type="Button" :buttonSettings="formatButton"></e-ribbon-item>169 </e-ribbon-items>170 </e-ribbon-collection>171 </e-ribbon-collections>172 </e-ribbon-group>173174 <!-- Font Group -->175 <e-ribbon-group header="Font" orientation="Row" :enableGroupOverflow="true">176 <e-ribbon-collections>177 <e-ribbon-collection>178 <e-ribbon-items>179 <e-ribbon-item type="ComboBox" :comboBoxSettings="fontOptions"></e-ribbon-item>180 <e-ribbon-item type="ComboBox" :comboBoxSettings="sizeOptions"></e-ribbon-item>181 </e-ribbon-items>182 </e-ribbon-collection>183 <e-ribbon-collection>184 <e-ribbon-items>185 <e-ribbon-item type="Button" :allowedSizes="smallSize" :buttonSettings="boldButton"></e-ribbon-item>186 <e-ribbon-item type="Button" :allowedSizes="smallSize" :buttonSettings="italicButton"></e-ribbon-item>187 </e-ribbon-items>188 </e-ribbon-collection>189 </e-ribbon-collections>190 </e-ribbon-group>191 </e-ribbon-groups>192 </e-ribbon-tab>193 </e-ribbon-tabs>194 </ejs-ribbon>195</template>196197<script setup>198import { RibbonComponent as EjsRibbon, RibbonItemSize, RibbonFileMenu,199 RibbonTabsDirective as ERibbonTabs, RibbonTabDirective as ERibbonTab,200 RibbonGroupsDirective as ERibbonGroups, RibbonGroupDirective as ERibbonGroup,201 RibbonCollectionsDirective as ERibbonCollections, RibbonCollectionDirective as ERibbonCollection,202 RibbonItemsDirective as ERibbonItems, RibbonItemDirective as ERibbonItem 203} from "@syncfusion/ej2-vue-ribbon";204import { provide } from "vue";205206// Inject required modules207provide('ribbon', [RibbonFileMenu]);208209// Define sizes210const largeSize = RibbonItemSize.Large;211const smallSize = RibbonItemSize.Small;212213// File menu configuration214const fileSettings = {215 visible: true,216 menuItems: [217 { text: "New", iconCss: "e-icons e-file-new", id: "new" },218 { text: "Open", iconCss: "e-icons e-folder-open", id: "open" },219 { text: "Save", iconCss: "e-icons e-save", id: "save" }220 ]221};222223// Button settings224const pasteSettings = { 225 iconCss: "e-icons e-paste", 226 content: "Paste",227 items: [{ text: "Keep Source Format" }, { text: "Merge format" }, { text: "Keep text only" }]228};229const cutButton = { iconCss: "e-icons e-cut", content: "Cut" };230const copyButton = { iconCss: "e-icons e-copy", content: "Copy" };231const formatButton = { iconCss: "e-icons e-format-painter", content: "Format Painter" };232const boldButton = { iconCss: "e-icons e-bold", content: "Bold", isToggle: true };233const italicButton = { iconCss: "e-icons e-italic", content: "Italic", isToggle: true };234235// ComboBox options236const fontOptions = {237 dataSource: ["Arial", "Calibri", "Georgia", "Times New Roman", "Verdana"],238 index: 1,239 width: "150px"240};241const sizeOptions = {242 dataSource: ["8", "10", "12", "14", "16", "18", "20"],243 index: 2,244 width: "65px"245};246</script>247248<style>249@import "../node_modules/@syncfusion/ej2-material3-theme/styles/ribbon/index.css";250</style>251```252253## Common Patterns254255### Pattern 1: Document Editor Ribbon256```vue257// Tabs: Home, Insert, Design, Layout258// Groups: Clipboard, Font, Paragraph, Styles, Tables, Illustrations259// Items: Text formatting, styles gallery, insert options260```261262### Pattern 2: Responsive Layout with Overflow263```vue264<e-ribbon-group header="Commands" :enableGroupOverflow="true" orientation="Row">265 <!-- Items automatically overflow to dropdown when space is limited -->266</e-ribbon-group>267```268269### Pattern 3: Contextual Tab for Selected Objects270```vue271<e-ribbon-contextual-tabs>272 <e-ribbon-contextual-tab :visible="imageSelected" isSelected="true">273 <e-ribbon-tabs>274 <e-ribbon-tab header="Picture Format">275 <!-- Image-specific tools -->276 </e-ribbon-tab>277 </e-ribbon-tabs>278 </e-ribbon-contextual-tab>279</e-ribbon-contextual-tabs>280```281282### Pattern 4: Gallery-Based Selection283```vue284<e-ribbon-item type="Gallery" :gallerySettings="{285 groups: [{286 header: 'Styles',287 items: [288 { content: 'Normal' },289 { content: 'Heading 1' },290 { content: 'Heading 2' }291 ]292 }]293}"></e-ribbon-item>294```