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