Syncfusion React Ribbon
Component Overview
The Syncfusion React Ribbon component is a professional, feature-rich toolbar designed for creating command-centric user interfaces inspired by Microsoft Office. It provides an intuitive hierarchical structure that organizes related commands into visually distinct tabs and groups, enabling users to quickly discover and execute actions.
Key Capabilities
- Tabbed Ribbon Interface: Organize commands into logical tabs for easy navigation and grouping
- Dual Layout Modes: Support for Classic (multi-row) and Simplified (single-row) layouts with dynamic switching
- Multiple Item Types: Buttons, checkboxes, dropdowns, split buttons, combo boxes, color pickers, group buttons, galleries, and custom templates
- Responsive Resizing: Automatically adjust item sizes (Large, Medium, Small) based on available space
- File Menu & Backstage View: Complete file menu with traditional File menu or modern backstage interface
- Contextual Tabs: Show/hide tabs dynamically based on user selection or application state
- Gallery Support: Visual selection galleries with grouping, filtering, and custom item templates
- KeyTips & Keyboard Navigation: Accessibility-first keyboard navigation with KeyTip support
- Group Overflow Management: Control group priority and dedicated overflow popups for better space utilization
- Rich Customization: Custom CSS classes, item templates, icons, and layout control
- Comprehensive Event Handling: itemClick, tabSelected, fileMenuSelect, and more for precise control
- Multi-Theme Support: Material, Bootstrap, Fluent, and Tailwind CSS themes with dark mode
- RTL & Accessibility: Full right-to-left language support and WCAG compliance with ARIA attributes
- Help Pane Integration: Built-in help pane for contextual assistance and documentation
Hierarchical Structure:
- Ribbon (root container) - Main toolbar component
- Tabs (e.g., Home, Insert, View, Design) - Logical command groupings
- Groups (e.g., Clipboard, Font, Styles) - Related command categories
- Collections (logical item containers) - Item arrangement helpers
- Items (buttons, dropdowns, galleries, color pickers, etc.) - Individual commands and controls
Documentation
Getting Started
📄 Read: references/getting-started.md
- Installation and package setup
- Basic ribbon component implementation
- CSS imports and themes
- First working example
- TypeScript configuration
Ribbon Structure
📄 Read: references/ribbon-structure.md
- Tabs creation and configuration
- Groups organization and hierarchy
- Collections and item containers
- Tab header properties
- Group headers and icons
- Item size and orientation
Items and Groups
📄 Read: references/items-and-groups.md
- Built-in item types (Button, CheckBox, DropDown, SplitButton, ComboBox, ColorPicker, GroupButton, Template)
- Item properties and icons
- Item sizes (Large, Medium, Small) and active size control
- Item CSS customization with custom classes
- Item tooltips with RibbonTooltipSettings
- Item templates for custom rendering
- Disabled state and display options
- Group orientation (Row vs Column)
- Group overflow behavior and priority
Tabs and Groups Configuration
📄 Read: references/tabs-and-groups.md
- Adding and managing tabs
- Tab-level configuration and CSS customization
- Tab styling with custom classes and themes
- Group properties and organization
- Group headers and icons
- Group collapsibility and launcher icons
- Dynamic tab/group management
Layouts and Display Modes
📄 Read: references/layouts-display-modes.md
- Classic layout (traditional multi-row format)
- Simplified layout (single-row compact format)
- Layout switching and the layout switcher button
- Display options for items (Auto, Classic, Simplified, Overflow)
- Responsive resizing behavior
- Item size adaptation during resizing
- Minimized state (ribbon collapse)
File Menu and Backstage
📄 Read: references/file-menu-backstage.md
- File menu configuration and visibility
- File menu item templates for custom rendering
- File menu popup templates
- File menu animation settings
- File menu tooltip configuration
- Complete event handling (beforeOpen, open, beforeClose, close, beforeItemRender, select)
- Backstage view implementation
- Backstage items configuration with advanced options
- Backstage dimensions (width, height) and positioning
- Backstage KeyTip integration
- Backstage tooltip settings
- Footer items and separators
- Back button customization
- Custom backstage templates
- Navigation within backstage
Contextual Tabs and Gallery
📄 Read: references/contextual-tabs-gallery.md
- Creating contextual tabs
- Controlling contextual tab visibility
- Showing/hiding contextual tabs programmatically
- Gallery item configuration
- Gallery groups and items
- Gallery item templates
- Gallery filtering and selection
- Popup width and height
Events and Accessibility
📄 Read: references/events-accessibility.md
- Ribbon events (itemClick, tabSelected, etc.)
- Event handling and callbacks
- Keyboard shortcuts with KeyTips
- KeyTip configuration
- Accessibility compliance (WCAG)
- ARIA attributes
- Screen reader support
- RTL support
- Focus management
- Keyboard navigation
Customization and Theming
📄 Read: references/customization-theming.md
- Available built-in themes (Material, Bootstrap, Fluent, Tailwind)
- Importing and applying themes
- CSS customization
- Custom icon fonts
- Theme Studio integration
- Dark mode support
- Responsive design considerations
- Custom CSS classes
Tooltips and Help Pane
📄 Read: references/tooltips-help-pane.md
- Tooltip implementation for items
- Custom tooltip templates
- Help pane configuration
- Help pane templates and content
- Contextual help integration
Troubleshooting
📄 Read: references/troubleshooting.md
- Common issues and solutions
- Performance optimization tips
- Styling and display issues
- Event handling problems
- Module injection troubleshooting
- Responsive behavior issues
Quick Start
Basic Ribbon with Tabs and Groups
import { RibbonComponent, RibbonTabsDirective, RibbonTabDirective, RibbonGroupsDirective, RibbonGroupDirective, RibbonCollectionsDirective, RibbonCollectionDirective, RibbonItemsDirective, RibbonItemDirective } from "@syncfusion/ej2-react-ribbon";
@import "@syncfusion/ej2-tailwind3-theme/styles/ribbon/index.css";
function App() {
return (
<RibbonComponent id="ribbon">
<RibbonTabsDirective>
<RibbonTabDirective header="Home">
<RibbonGroupsDirective>
<RibbonGroupDirective header="Clipboard">
<RibbonCollectionsDirective>
<RibbonCollectionDirective>
<RibbonItemsDirective>
<RibbonItemDirective type="Button" buttonSettings={{ iconCss: "e-icons e-cut", content: "Cut" }}>
</RibbonItemDirective>
<RibbonItemDirective type="Button" buttonSettings={{ iconCss: "e-icons e-copy", content: "Copy" }}>
</RibbonItemDirective>
<RibbonItemDirective type="Button" buttonSettings={{ iconCss: "e-icons e-paste", content: "Paste" }}>
</RibbonItemDirective>
</RibbonItemsDirective>
</RibbonCollectionDirective>
</RibbonCollectionsDirective>
</RibbonGroupDirective>
</RibbonGroupsDirective>
</RibbonTabDirective>
</RibbonTabsDirective>
</RibbonComponent>
);
}
export default App;
Ribbon with File Menu
import { RibbonComponent, RibbonTabsDirective, RibbonTabDirective, RibbonGroupsDirective, RibbonGroupDirective, RibbonCollectionsDirective, RibbonCollectionDirective, RibbonItemsDirective, RibbonItemDirective, RibbonFileMenu, Inject } from "@syncfusion/ej2-react-ribbon";
import { MenuItemModel } from '@syncfusion/ej2-navigations';
function App() {
const fileOptions: MenuItemModel[] = [
{ 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" },
{ text: "Save as", iconCss: "e-icons e-save", id: "saveas" }
];
return (
<RibbonComponent id="ribbon" fileMenu={{ visible: true, menuItems: fileOptions }}>
<RibbonTabsDirective>
<RibbonTabDirective header="Home">
<RibbonGroupsDirective>
<RibbonGroupDirective header="Clipboard">
<RibbonCollectionsDirective>
<RibbonCollectionDirective>
<RibbonItemsDirective>
<RibbonItemDirective type="Button" buttonSettings={{ iconCss: "e-icons e-cut", content: "Cut" }}>
</RibbonItemDirective>
</RibbonItemsDirective>
</RibbonCollectionDirective>
</RibbonCollectionsDirective>
</RibbonGroupDirective>
</RibbonGroupsDirective>
</RibbonTabDirective>
</RibbonTabsDirective>
<Inject services={[RibbonFileMenu]} />
</RibbonComponent>
);
}
export default App;
Common Patterns
Pattern 1: Multi-Tab Ribbon with Multiple Item Types
Structure a professional ribbon with multiple tabs containing different item types (buttons, dropdowns, combos).
Pattern 2: Responsive Ribbon with Classic and Simplified Layouts
Create a ribbon that switches between Classic (multi-row) and Simplified (single-row) layouts based on screen size or user preference.
Pattern 3: Context-Aware Ribbon
Show/hide contextual tabs dynamically when users select specific objects or content types.
Pattern 4: File Menu with Backstage View
Combine file menu with backstage for comprehensive document management and application settings.
Pattern 5: Gallery-Based Item Selection
Use galleries to provide visual selection of styles, templates, or formatting options.
Key Props and Features
RibbonComponent:
fileMenu - Configure file menu visibility and items
backStageMenu - Enable and configure backstage view
activeLayout - Set layout mode (Classic, Simplified)
isMinimized - Programmatically minimize/expand ribbon
hideLayoutSwitcher - Hide the layout switcher button
RibbonTabDirective:
header - Tab title text
cssClass - Custom CSS classes for tab styling
RibbonGroupDirective:
header - Group title
orientation - Item alignment (Row, Column)
groupIconCss - Custom icon for group overflow
showLauncherIcon - Show launcher icon
enableGroupOverflow - Dedicated overflow popup for group
isCollapsible - Allow group to collapse on resize
priority - Collapse/expand priority
RibbonItemDirective:
type - Item type (Button, CheckBox, DropDown, SplitButton, ComboBox, ColorPicker, GroupButton, Gallery, Template)
allowedSizes - Permitted item sizes (Large, Medium, Small)
activeSize - Current display size of the item
cssClass - Custom CSS classes for item styling
ribbonTooltipSettings - Tooltip configuration with title and content
itemTemplate - Custom template for item rendering
displayOptions - Visibility in layouts (Auto, Classic, Simplified, Overflow)
disabled - Enable/disable item
- Settings objects:
buttonSettings, dropDownSettings, splitButtonSettings, etc.
For complete examples and advanced scenarios, explore individual reference files above.
1---
2name: syncfusion-react-ribbon
3description: Implement the Syncfusion React Ribbon component. Use this skill for creating Ribbon UIs with tabs, groups, items, Classic or Simplified layouts, file menu and backstage view, contextual tabs, galleries, KeyTips, accessibility, theming, responsive behavior, customization, and troubleshooting in React.
4metadata:
5 author: "Syncfusion Inc"
6 version: "34.1.29"
7---
8
9# Syncfusion React Ribbon
10
11## Component Overview
12
13The Syncfusion React Ribbon component is a professional, feature-rich toolbar designed for creating command-centric user interfaces inspired by Microsoft Office. It provides an intuitive hierarchical structure that organizes related commands into visually distinct tabs and groups, enabling users to quickly discover and execute actions.
14
15## Key Capabilities
16
17- **Tabbed Ribbon Interface**: Organize commands into logical tabs for easy navigation and grouping
18- **Dual Layout Modes**: Support for Classic (multi-row) and Simplified (single-row) layouts with dynamic switching
19- **Multiple Item Types**: Buttons, checkboxes, dropdowns, split buttons, combo boxes, color pickers, group buttons, galleries, and custom templates
20- **Responsive Resizing**: Automatically adjust item sizes (Large, Medium, Small) based on available space
21- **File Menu & Backstage View**: Complete file menu with traditional File menu or modern backstage interface
22- **Contextual Tabs**: Show/hide tabs dynamically based on user selection or application state
23- **Gallery Support**: Visual selection galleries with grouping, filtering, and custom item templates
24- **KeyTips & Keyboard Navigation**: Accessibility-first keyboard navigation with KeyTip support
25- **Group Overflow Management**: Control group priority and dedicated overflow popups for better space utilization
26- **Rich Customization**: Custom CSS classes, item templates, icons, and layout control
27- **Comprehensive Event Handling**: itemClick, tabSelected, fileMenuSelect, and more for precise control
28- **Multi-Theme Support**: Material, Bootstrap, Fluent, and Tailwind CSS themes with dark mode
29- **RTL & Accessibility**: Full right-to-left language support and WCAG compliance with ARIA attributes
30- **Help Pane Integration**: Built-in help pane for contextual assistance and documentation
31
32
33**Hierarchical Structure:**
34- **Ribbon** (root container) - Main toolbar component
35 - **Tabs** (e.g., Home, Insert, View, Design) - Logical command groupings
36 - **Groups** (e.g., Clipboard, Font, Styles) - Related command categories
37 - **Collections** (logical item containers) - Item arrangement helpers
38 - **Items** (buttons, dropdowns, galleries, color pickers, etc.) - Individual commands and controls
39
40## Documentation
41
42### Getting Started
43
44📄 **Read:** [references/getting-started.md](references/getting-started.md)
45- Installation and package setup
46- Basic ribbon component implementation
47- CSS imports and themes
48- First working example
49- TypeScript configuration
50
51### Ribbon Structure
52
53📄 **Read:** [references/ribbon-structure.md](references/ribbon-structure.md)
54- Tabs creation and configuration
55- Groups organization and hierarchy
56- Collections and item containers
57- Tab header properties
58- Group headers and icons
59- Item size and orientation
60
61### Items and Groups
62
63📄 **Read:** [references/items-and-groups.md](references/items-and-groups.md)
64- Built-in item types (Button, CheckBox, DropDown, SplitButton, ComboBox, ColorPicker, GroupButton, Template)
65- Item properties and icons
66- Item sizes (Large, Medium, Small) and active size control
67- Item CSS customization with custom classes
68- Item tooltips with RibbonTooltipSettings
69- Item templates for custom rendering
70- Disabled state and display options
71- Group orientation (Row vs Column)
72- Group overflow behavior and priority
73
74### Tabs and Groups Configuration
75
76📄 **Read:** [references/tabs-and-groups.md](references/tabs-and-groups.md)
77- Adding and managing tabs
78- Tab-level configuration and CSS customization
79- Tab styling with custom classes and themes
80- Group properties and organization
81- Group headers and icons
82- Group collapsibility and launcher icons
83- Dynamic tab/group management
84
85### Layouts and Display Modes
86
87📄 **Read:** [references/layouts-display-modes.md](references/layouts-display-modes.md)
88- Classic layout (traditional multi-row format)
89- Simplified layout (single-row compact format)
90- Layout switching and the layout switcher button
91- Display options for items (Auto, Classic, Simplified, Overflow)
92- Responsive resizing behavior
93- Item size adaptation during resizing
94- Minimized state (ribbon collapse)
95
96### File Menu and Backstage
97
98📄 **Read:** [references/file-menu-backstage.md](references/file-menu-backstage.md)
99- File menu configuration and visibility
100- File menu item templates for custom rendering
101- File menu popup templates
102- File menu animation settings
103- File menu tooltip configuration
104- Complete event handling (beforeOpen, open, beforeClose, close, beforeItemRender, select)
105- Backstage view implementation
106- Backstage items configuration with advanced options
107- Backstage dimensions (width, height) and positioning
108- Backstage KeyTip integration
109- Backstage tooltip settings
110- Footer items and separators
111- Back button customization
112- Custom backstage templates
113- Navigation within backstage
114
115### Contextual Tabs and Gallery
116
117📄 **Read:** [references/contextual-tabs-gallery.md](references/contextual-tabs-gallery.md)
118- Creating contextual tabs
119- Controlling contextual tab visibility
120- Showing/hiding contextual tabs programmatically
121- Gallery item configuration
122- Gallery groups and items
123- Gallery item templates
124- Gallery filtering and selection
125- Popup width and height
126
127### Events and Accessibility
128
129📄 **Read:** [references/events-accessibility.md](references/events-accessibility.md)
130- Ribbon events (itemClick, tabSelected, etc.)
131- Event handling and callbacks
132- Keyboard shortcuts with KeyTips
133- KeyTip configuration
134- Accessibility compliance (WCAG)
135- ARIA attributes
136- Screen reader support
137- RTL support
138- Focus management
139- Keyboard navigation
140
141### Customization and Theming
142
143📄 **Read:** [references/customization-theming.md](references/customization-theming.md)
144- Available built-in themes (Material, Bootstrap, Fluent, Tailwind)
145- Importing and applying themes
146- CSS customization
147- Custom icon fonts
148- Theme Studio integration
149- Dark mode support
150- Responsive design considerations
151- Custom CSS classes
152
153### Tooltips and Help Pane
154
155📄 **Read:** [references/tooltips-help-pane.md](references/tooltips-help-pane.md)
156- Tooltip implementation for items
157- Custom tooltip templates
158- Help pane configuration
159- Help pane templates and content
160- Contextual help integration
161
162### Troubleshooting
163
164📄 **Read:** [references/troubleshooting.md](references/troubleshooting.md)
165- Common issues and solutions
166- Performance optimization tips
167- Styling and display issues
168- Event handling problems
169- Module injection troubleshooting
170- Responsive behavior issues
171
172## Quick Start
173
174### Basic Ribbon with Tabs and Groups
175
176```tsx
177import { RibbonComponent, RibbonTabsDirective, RibbonTabDirective, RibbonGroupsDirective, RibbonGroupDirective, RibbonCollectionsDirective, RibbonCollectionDirective, RibbonItemsDirective, RibbonItemDirective } from "@syncfusion/ej2-react-ribbon";
178@import "@syncfusion/ej2-tailwind3-theme/styles/ribbon/index.css";
179
180function App() {
181 return (
182 <RibbonComponent id="ribbon">
183 <RibbonTabsDirective>
184 <RibbonTabDirective header="Home">
185 <RibbonGroupsDirective>
186 <RibbonGroupDirective header="Clipboard">
187 <RibbonCollectionsDirective>
188 <RibbonCollectionDirective>
189 <RibbonItemsDirective>
190 <RibbonItemDirective type="Button" buttonSettings={{ iconCss: "e-icons e-cut", content: "Cut" }}>
191 </RibbonItemDirective>
192 <RibbonItemDirective type="Button" buttonSettings={{ iconCss: "e-icons e-copy", content: "Copy" }}>
193 </RibbonItemDirective>
194 <RibbonItemDirective type="Button" buttonSettings={{ iconCss: "e-icons e-paste", content: "Paste" }}>
195 </RibbonItemDirective>
196 </RibbonItemsDirective>
197 </RibbonCollectionDirective>
198 </RibbonCollectionsDirective>
199 </RibbonGroupDirective>
200 </RibbonGroupsDirective>
201 </RibbonTabDirective>
202 </RibbonTabsDirective>
203 </RibbonComponent>
204 );
205}
206
207export default App;
208```
209
210### Ribbon with File Menu
211
212```tsx
213import { RibbonComponent, RibbonTabsDirective, RibbonTabDirective, RibbonGroupsDirective, RibbonGroupDirective, RibbonCollectionsDirective, RibbonCollectionDirective, RibbonItemsDirective, RibbonItemDirective, RibbonFileMenu, Inject } from "@syncfusion/ej2-react-ribbon";
214import { MenuItemModel } from '@syncfusion/ej2-navigations';
215
216function App() {
217 const fileOptions: MenuItemModel[] = [
218 { text: "New", iconCss: "e-icons e-file-new", id: "new" },
219 { text: "Open", iconCss: "e-icons e-folder-open", id: "open" },
220 { text: "Save", iconCss: "e-icons e-save", id: "save" },
221 { text: "Save as", iconCss: "e-icons e-save", id: "saveas" }
222 ];
223
224 return (
225 <RibbonComponent id="ribbon" fileMenu={{ visible: true, menuItems: fileOptions }}>
226 <RibbonTabsDirective>
227 <RibbonTabDirective header="Home">
228 <RibbonGroupsDirective>
229 <RibbonGroupDirective header="Clipboard">
230 <RibbonCollectionsDirective>
231 <RibbonCollectionDirective>
232 <RibbonItemsDirective>
233 <RibbonItemDirective type="Button" buttonSettings={{ iconCss: "e-icons e-cut", content: "Cut" }}>
234 </RibbonItemDirective>
235 </RibbonItemsDirective>
236 </RibbonCollectionDirective>
237 </RibbonCollectionsDirective>
238 </RibbonGroupDirective>
239 </RibbonGroupsDirective>
240 </RibbonTabDirective>
241 </RibbonTabsDirective>
242 <Inject services={[RibbonFileMenu]} />
243 </RibbonComponent>
244 );
245}
246
247export default App;
248```
249
250## Common Patterns
251
252### Pattern 1: Multi-Tab Ribbon with Multiple Item Types
253
254Structure a professional ribbon with multiple tabs containing different item types (buttons, dropdowns, combos).
255
256### Pattern 2: Responsive Ribbon with Classic and Simplified Layouts
257
258Create a ribbon that switches between Classic (multi-row) and Simplified (single-row) layouts based on screen size or user preference.
259
260### Pattern 3: Context-Aware Ribbon
261
262Show/hide contextual tabs dynamically when users select specific objects or content types.
263
264### Pattern 4: File Menu with Backstage View
265
266Combine file menu with backstage for comprehensive document management and application settings.
267
268### Pattern 5: Gallery-Based Item Selection
269
270Use galleries to provide visual selection of styles, templates, or formatting options.
271
272## Key Props and Features
273
274**RibbonComponent:**
275- `fileMenu` - Configure file menu visibility and items
276- `backStageMenu` - Enable and configure backstage view
277- `activeLayout` - Set layout mode (Classic, Simplified)
278- `isMinimized` - Programmatically minimize/expand ribbon
279- `hideLayoutSwitcher` - Hide the layout switcher button
280
281**RibbonTabDirective:**
282- `header` - Tab title text
283- `cssClass` - Custom CSS classes for tab styling
284
285**RibbonGroupDirective:**
286- `header` - Group title
287- `orientation` - Item alignment (Row, Column)
288- `groupIconCss` - Custom icon for group overflow
289- `showLauncherIcon` - Show launcher icon
290- `enableGroupOverflow` - Dedicated overflow popup for group
291- `isCollapsible` - Allow group to collapse on resize
292- `priority` - Collapse/expand priority
293
294**RibbonItemDirective:**
295- `type` - Item type (Button, CheckBox, DropDown, SplitButton, ComboBox, ColorPicker, GroupButton, Gallery, Template)
296- `allowedSizes` - Permitted item sizes (Large, Medium, Small)
297- `activeSize` - Current display size of the item
298- `cssClass` - Custom CSS classes for item styling
299- `ribbonTooltipSettings` - Tooltip configuration with title and content
300- `itemTemplate` - Custom template for item rendering
301- `displayOptions` - Visibility in layouts (Auto, Classic, Simplified, Overflow)
302- `disabled` - Enable/disable item
303- Settings objects: `buttonSettings`, `dropDownSettings`, `splitButtonSettings`, etc.
304
305
306**For complete examples and advanced scenarios, explore individual reference files above.**