Loading...
Loading...
Implement the Syncfusion Angular Ribbon component. Use this skill when you need to create Microsoft Office-style ribbon interfaces, organize application commands in tabs and groups, implement file menus or backstage views, or create sophisticated command interfaces. Includes setup, configuration, event handling, layouts, and customization. Use this skill for all Ribbon component implementation needs.
npx skill4agent add syncfusion/angular-ui-components-skills syncfusion-angular-ribbonimport { Component } from "@angular/core";
import { RibbonModule } from '@syncfusion/ej2-angular-ribbon';
import { RibbonButtonSettingsModel, RibbonSplitButtonSettingsModel } from '@syncfusion/ej2-angular-ribbon';
@Component({
imports: [ RibbonModule ],
standalone: true,
selector: "app-root",
template: `
<ejs-ribbon id="ribbon">
<e-ribbon-tabs>
<e-ribbon-tab header="Home">
<e-ribbon-groups>
<e-ribbon-group header="Clipboard" orientation="Row">
<e-ribbon-collections>
<e-ribbon-collection>
<e-ribbon-items>
<e-ribbon-item type="SplitButton" [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-items>
</e-ribbon-collection>
</e-ribbon-collections>
</e-ribbon-group>
</e-ribbon-groups>
</e-ribbon-tab>
<e-ribbon-tab header="Insert">
<e-ribbon-groups>
<e-ribbon-group header="Illustrations" orientation="Row">
<e-ribbon-collections>
<e-ribbon-collection>
<e-ribbon-items>
<e-ribbon-item type="Button" [buttonSettings]="chartButton"></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>
`,
styleUrls: ['./app.component.css']
})
export class AppComponent {
public pasteSettings = {
iconCss: "e-icons e-paste",
items: [{ text: "Keep Source Format" }, { text: "Merge format" }],
content: "Paste"
};
public cutButton: RibbonButtonSettingsModel = { iconCss: "e-icons e-cut", content: "Cut" };
public copyButton: RibbonButtonSettingsModel = { iconCss: "e-icons e-copy", content: "Copy" };
public chartButton: RibbonButtonSettingsModel = { iconCss: "e-icons e-chart", content: "Chart" };
}activeLayouttabSelectedfileMenubackStageMenuiconCssallowedSizesactiveSizeLargeSmallribbonCollapsingcontextualTabsvisibleisSelectedtabSelectedenableKeyTipskeyTiplayoutSwitcherKeyTiptype="Gallery"gallerySettingsitemCountpopupWidthpopupHeight| Property | Type | Default | When to Use |
|---|---|---|---|
| RibbonTabModel[] | | Define ribbon tabs with groups and items |
| LayoutType | | Set layout mode (Classic or Simplified) |
| number | | Set or get the currently active tab index |
| boolean | | Control ribbon minimized state |
| Property | Type | Default | When to Use |
|---|---|---|---|
| string | number | | Set ribbon container width |
| string | | Apply custom CSS classes for styling and themes |
| boolean | | Hide the Classic/Simplified layout toggle button |
| object | | Configure tab switching animation settings |
| Property | Type | Default | When to Use |
|---|---|---|---|
| boolean | | Enable keytips for keyboard navigation (Alt+ shortcuts) |
| string | | Set keytip for layout switcher button |
| string | | Default CSS class for launcher icons across all groups |
| Property | Type | Default | When to Use |
|---|---|---|---|
| FileMenuSettingsModel | | Configure traditional file menu (New, Open, Save, Print) |
| BackStageMenuModel | | Configure modern backstage view (replaces file menu) |
| Property | Type | Default | When to Use |
|---|---|---|---|
| RibbonContextualTabModel[] | | Define tabs that appear based on context or selection |
| string | | Custom template for help pane content |
| Property | Type | Default | When to Use |
|---|---|---|---|
| string | | Set language/culture for localization |
| boolean | | Enable right-to-left layout (Arabic, Hebrew, Persian, Urdu) |
| boolean | | Save ribbon state between page reloads |
| Property | Type | Default | When to Use |
|---|---|---|---|
| string | | Tab display text (Home, Insert, View) |
| RibbonGroupModel[] | | Array of groups within the tab |
| string | | Unique identifier for the tab |
| string | | Keyboard shortcut keytip (H for Home) |
| Property | Type | Default | When to Use |
|---|---|---|---|
| string | | Group display text (Clipboard, Font, Alignment) |
| ItemOrientation | | Layout direction (Row or Column) |
| boolean | | Show overflow dropdown when group doesn't fit |
| boolean | | Allow group to collapse in simplified layout |
| boolean | | Show launcher icon for dialog/pane launch |
| string | | CSS class for group icon in overflow/launcher |
| Property | Type | Default | When to Use |
|---|---|---|---|
| RibbonItemType | | Item type: Button, CheckBox, DropDown, SplitButton, ComboBox, ColorPicker, GroupButton, Gallery |
| string | | Unique identifier for the item |
| RibbonItemSize[] | | Sizes item can resize to (responsive behavior) |
| RibbonItemSize | | Current display size of item |
| boolean | | Disable item to prevent user interaction |
| DisplayMode | | Control display (Auto, Classic, Simplified, Overflow) |
| string | | Custom CSS class for item styling |
| string | | Keyboard shortcut keytip for item |
| TooltipSettingsModel | | Tooltip configuration (id, title, content, iconCss, cssClass) |
| string | | Custom template for item rendering |
| RibbonButtonSettingsModel | | Button-specific settings (iconCss, content, clicked) |
| RibbonDropDownSettingsModel | | DropDown-specific settings (iconCss, content, items) |
| RibbonSplitButtonSettingsModel | | SplitButton-specific settings (iconCss, items, clicked) |
| RibbonCheckBoxSettingsModel | | CheckBox-specific settings (label, checked, change) |
| RibbonColorPickerSettingsModel | | ColorPicker-specific settings (value, change) |
| RibbonComboBoxSettingsModel | | ComboBox-specific settings (dataSource, value, fields) |
| RibbonGroupButtonSettingsModel | | GroupButton-specific settings (items, selected) |
| RibbonGallerySettingsModel | | Gallery configuration (groups, items, itemCount, popupWidth, popupHeight, template) |
| Property | Type | Default | When to Use |
|---|---|---|---|
| boolean | | Show/hide file menu button |
| string | | File menu button text |
| FileMenuItemModel[] | | Array of menu items (New, Open, Save, Print) |
| string | | Custom template for menu items |
| string | | Custom template for entire popup |
| string | | Keytip for file menu (F for File) |
| TooltipSettingsModel | | Tooltip settings for file menu button |
| Property | Type | Default | When to Use |
|---|---|---|---|
| boolean | | Show/hide backstage view |
| string | | Backstage button text |
| BackStageItemModel[] | | Backstage items (id, text, iconCss, content, separator, isFooter) |
| BackButtonModel | | Back button configuration (text, iconCss, visible) |
| string | | Backstage width dimension |
| string | | Backstage height dimension |
| HTMLElement | | Element for positioning backstage |
| string | | Custom template for backstage content |
| string | | Keytip for backstage button |
| TooltipSettingsModel | | Tooltip settings for backstage button |
| Property | Type | Default | When to Use |
|---|---|---|---|
| boolean | | Show/hide contextual tab group |
| boolean | | Whether contextual tab is active |
| RibbonTabModel[] | | Array of tabs in contextual group |
| Event | Arguments | When to Use |
|---|---|---|
| TabSelectedEventArgs | After a tab is selected (get tab index and data) |
| TabSelectingEventArgs | Before tab selection (cancelable, validate selection) |
| RibbonCollapsingEventArgs | Before ribbon collapses (cancelable) |
| RibbonExpandedEventArgs | After ribbon expands |
| LauncherClickEventArgs | When launcher icon is clicked (open dialog/pane) |
| OverflowPopupEventArgs | Before overflow popup opens (cancelable) |
| OverflowPopupEventArgs | Before overflow popup closes (cancelable) |
| LayoutSwitchedEventArgs | When layout switches between Classic/Simplified |
| BackStageItemClickEventArgs | When backstage item is clicked |
| Event | Arguments | When to Use |
|---|---|---|
| BeforeOpenCloseMenuEventArgs | Before file menu opens (cancelable) |
| OpenCloseMenuEventArgs | After file menu opens |
| BeforeOpenCloseMenuEventArgs | Before file menu closes (cancelable) |
| OpenCloseMenuEventArgs | After file menu closes |
| MenuEventArgs | Before menu item renders (customize rendering) |
| MenuEventArgs | When menu item is selected |