Gallery Items in EJ2 TypeScript Ribbon Control
25 Mar 202524 minutes to read
The Ribbon supports Gallery view which allows users to perform specific actions by displaying a collection of related items, including icons, content, or images. You can render the gallery item by setting the type property to Gallery
and customize it by using the RibbonGallerySettingsModel, which provides options such as groups
, itemCount
, popupHeight
, popupWidth
and more.
Groups
You can render the groups inside the gallery items by using groups property and customize the groups using RibbonGalleryGroupModel, which provides options such as items
, cssClass
, header
and more.
Adding items
You can render the gallery items by using items property and customize using the RibbonGalleryItemModel, which provides options such as content
, iconCss
, disabled
and more.
import { Ribbon, RibbonTabModel, RibbonItemType, RibbonGallery } from "@syncfusion/ej2-ribbon";
Ribbon.Inject(RibbonGallery);
let tabs: RibbonTabModel[] = [
{
header: "Home",
groups: [
{
header: "Clipboard",
groupIconCss: 'e-icons e-paste',
collections: [{
items: [{
type: RibbonItemType.SplitButton,
splitButtonSettings: {
iconCss: 'e-icons e-paste',
items: [{ text: 'Keep Source Format' }, { text: 'Merge Format' }, { text: 'Keep Text Only' }],
content: 'Paste'
}
}]
}, {
items: [{
type: RibbonItemType.Button,
buttonSettings: {
content: 'Cut',
iconCss: 'e-icons e-cut'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Copy',
iconCss: 'e-icons e-copy'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Format Painter',
iconCss: 'e-icons e-format-painter'
}
}]
}]
},
{
header: "Gallery",
collections: [
{
items: [
{
type: RibbonItemType.Gallery,
gallerySettings: {
groups: [{
header: 'Styles',
items: [
{
content: 'Normal'
}, {
content: 'No Spacing'
}, {
content: 'Heading 1'
}, {
content: 'Heading 2'
}
]
}]
}
}
]
}
]
}
]
}
];
let ribbon: Ribbon = new Ribbon({
tabs: tabs
});
ribbon.appendTo("#ribbon");
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
<title>Essential JS 2 - Ribbon</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="Essential JS 2" />
<meta name="author" content="Syncfusion" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-inputs/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-lists/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-dropdowns/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-navigations/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-ribbon/styles/material.css" rel="stylesheet" />
<!--system js reference and configuration-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
<div id='loader'>LOADING....</div>
<div id='container'>
<div id="ribbon"></div>
</div>
</body>
</html>
Adding content
You can use the content property to define the text content for the gallery item.
import { Ribbon, RibbonTabModel, RibbonItemType, RibbonGallery } from "@syncfusion/ej2-ribbon";
Ribbon.Inject(RibbonGallery);
let tabs: RibbonTabModel[] = [
{
header: "Home",
groups: [
{
header: "Clipboard",
groupIconCss: 'e-icons e-paste',
collections: [{
items: [{
type: RibbonItemType.SplitButton,
splitButtonSettings: {
iconCss: 'e-icons e-paste',
items: [{ text: 'Keep Source Format' }, { text: 'Merge Format' }, { text: 'Keep Text Only' }],
content: 'Paste'
}
}]
}, {
items: [{
type: RibbonItemType.Button,
buttonSettings: {
content: 'Cut',
iconCss: 'e-icons e-cut'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Copy',
iconCss: 'e-icons e-copy'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Format Painter',
iconCss: 'e-icons e-format-painter'
}
}]
}]
},
{
header: "Gallery",
collections: [
{
items: [
{
type: RibbonItemType.Gallery,
gallerySettings: {
groups: [{
header: 'Styles',
items: [
{
content: 'Normal'
}, {
content: 'No Spacing'
}, {
content: 'Heading 1'
}, {
content: 'Heading 2'
}
]
}]
}
}
]
}
]
}
]
}
];
let ribbon: Ribbon = new Ribbon({
tabs: tabs
});
ribbon.appendTo("#ribbon");
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
<title>Essential JS 2 - Ribbon</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="Essential JS 2" />
<meta name="author" content="Syncfusion" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-inputs/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-lists/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-dropdowns/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-navigations/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-ribbon/styles/material.css" rel="stylesheet" />
<!--system js reference and configuration-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
<div id='loader'>LOADING....</div>
<div id='container'>
<div id="ribbon"></div>
</div>
</body>
</html>
Adding icons
You can use the iconCss property to define the icons for the gallery item.
import { Ribbon, RibbonTabModel, RibbonItemType, RibbonGallery } from "@syncfusion/ej2-ribbon";
Ribbon.Inject(RibbonGallery);
let tabs: RibbonTabModel[] = [
{
header: "Home",
groups: [
{
header: "Clipboard",
groupIconCss: 'e-icons e-paste',
collections: [{
items: [{
type: RibbonItemType.SplitButton,
splitButtonSettings: {
iconCss: 'e-icons e-paste',
items: [{ text: 'Keep Source Format' }, { text: 'Merge Format' }, { text: 'Keep Text Only' }],
content: 'Paste'
}
}]
}, {
items: [{
type: RibbonItemType.Button,
buttonSettings: {
content: 'Cut',
iconCss: 'e-icons e-cut'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Copy',
iconCss: 'e-icons e-copy'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Format Painter',
iconCss: 'e-icons e-format-painter'
}
}]
}]
},
{
header: "Gallery",
collections: [
{
items: [
{
type: RibbonItemType.Gallery,
gallerySettings: {
groups: [{
header: 'Transitions',
items: [
{
content: 'None',
iconCss: 'e-icons e-rectangle'
}, {
content: 'Fade',
iconCss: 'e-icons e-send-backward'
}, {
content: 'Reveal',
iconCss: 'e-icons e-bring-forward'
}, {
content: 'Zoom',
iconCss: 'e-icons e-zoom-to-fit'
}
]
}]
}
}
]
}
]
}
]
}
];
let ribbon: Ribbon = new Ribbon({
tabs: tabs
});
ribbon.appendTo("#ribbon");
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
<title>Essential JS 2 - Ribbon</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="Essential JS 2" />
<meta name="author" content="Syncfusion" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-inputs/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-lists/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-dropdowns/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-navigations/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-ribbon/styles/material.css" rel="stylesheet" />
<!--system js reference and configuration-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
<div id='loader'>LOADING....</div>
<div id='container'>
<div id="ribbon"></div>
</div>
</body>
</html>
Adding html attributes
You can use the htmlAttributes property to add HTML attributes to the Ribbon gallery item.
The following sample showcases how to add title attribute to the gallery item using htmlAttributes
property.
import { Ribbon, RibbonTabModel, RibbonItemType, RibbonGallery } from "@syncfusion/ej2-ribbon";
Ribbon.Inject(RibbonGallery);
let tabs: RibbonTabModel[] = [
{
header: "Home",
groups: [
{
header: "Clipboard",
groupIconCss: 'e-icons e-paste',
collections: [{
items: [{
type: RibbonItemType.SplitButton,
splitButtonSettings: {
iconCss: 'e-icons e-paste',
items: [{ text: 'Keep Source Format' }, { text: 'Merge Format' }, { text: 'Keep Text Only' }],
content: 'Paste'
}
}]
}, {
items: [{
type: RibbonItemType.Button,
buttonSettings: {
content: 'Cut',
iconCss: 'e-icons e-cut'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Copy',
iconCss: 'e-icons e-copy'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Format Painter',
iconCss: 'e-icons e-format-painter'
}
}]
}]
},
{
header: "Gallery",
collections: [
{
items: [
{
type: RibbonItemType.Gallery,
gallerySettings: {
groups: [{
header: 'Styles',
items: [
{
content: 'Normal',
htmlAttributes: { title: "Normal" }
}, {
content: 'No Spacing',
htmlAttributes: { title: "No Spacing" }
}, {
content: 'Heading 1',
htmlAttributes: { title: "Heading 1" }
}, {
content: 'Heading 2',
htmlAttributes: { title: "Heading 2" }
}
]
}]
}
}
]
}
]
}
]
}
];
let ribbon: Ribbon = new Ribbon({
tabs: tabs
});
ribbon.appendTo("#ribbon");
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
<title>Essential JS 2 - Ribbon</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="Essential JS 2" />
<meta name="author" content="Syncfusion" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-inputs/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-lists/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-dropdowns/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-navigations/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-ribbon/styles/material.css" rel="stylesheet" />
<!--system js reference and configuration-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
<div id='loader'>LOADING....</div>
<div id='container'>
<div id="ribbon"></div>
</div>
</body>
</html>
Css class
You can use the cssClass property to customize the gallery item.
The following sample showcases how to customize the appearance of each gallery item using the cssClass
property .
import { Ribbon, RibbonTabModel, RibbonItemType, RibbonGallery } from "@syncfusion/ej2-ribbon";
Ribbon.Inject(RibbonGallery);
let tabs: RibbonTabModel[] = [
{
header: "Home",
groups: [
{
header: "Clipboard",
groupIconCss: 'e-icons e-paste',
collections: [{
items: [{
type: RibbonItemType.SplitButton,
splitButtonSettings: {
iconCss: 'e-icons e-paste',
items: [{ text: 'Keep Source Format' }, { text: 'Merge Format' }, { text: 'Keep Text Only' }],
content: 'Paste'
}
}]
}, {
items: [{
type: RibbonItemType.Button,
buttonSettings: {
content: 'Cut',
iconCss: 'e-icons e-cut'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Copy',
iconCss: 'e-icons e-copy'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Format Painter',
iconCss: 'e-icons e-format-painter'
}
}]
}]
},
{
header: "Gallery",
collections: [
{
items: [
{
type: RibbonItemType.Gallery,
gallerySettings: {
groups: [{
header: 'Good, Bad and Neutral',
items: [{
content: 'Normal',
cssClass: 'normal'
}, {
content: 'Bad',
cssClass: 'bad'
}, {
content: 'Good',
cssClass: 'good'
}, {
content: 'Neutral',
cssClass: 'neutral'
}
]
}]
}
}
]
}
]
}
]
}
];
let ribbon: Ribbon = new Ribbon({
tabs: tabs
});
ribbon.appendTo("#ribbon");
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
<title>Essential JS 2 - Ribbon</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="Essential JS 2" />
<meta name="author" content="Syncfusion" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-inputs/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-lists/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-dropdowns/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-navigations/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-ribbon/styles/material.css" rel="stylesheet" />
<!--system js reference and configuration-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
<style>
.e-ribbon-gallery-item {
margin: 5px;
}
.e-ribbon-gallery-item.normal{
background: #f0f0f0;
color: #333;
}
.e-ribbon-gallery-item.bad {
background: #ffb6b6;
color: #800000;
}
.e-ribbon-gallery-item.good {
background: #c7ebc9;
color: #004d00;
}
.e-ribbon-gallery-item.neutral {
background: #eedd9d;
color: #6c5429;
}
</style>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
<div id='loader'>LOADING....</div>
<div id='container'>
<div id="ribbon"></div>
</div>
</body>
</html>
Disabled
You can use the disabled property to disable the Ribbon gallery item. It prevents the user interaction when set to true
. By default, the value is false
.
import { Ribbon, RibbonTabModel, RibbonItemType, RibbonGallery } from "@syncfusion/ej2-ribbon";
Ribbon.Inject(RibbonGallery);
let tabs: RibbonTabModel[] = [
{
header: "Home",
groups: [
{
header: "Clipboard",
groupIconCss: 'e-icons e-paste',
collections: [{
items: [{
type: RibbonItemType.SplitButton,
splitButtonSettings: {
iconCss: 'e-icons e-paste',
items: [{ text: 'Keep Source Format' }, { text: 'Merge Format' }, { text: 'Keep Text Only' }],
content: 'Paste'
}
}]
}, {
items: [{
type: RibbonItemType.Button,
buttonSettings: {
content: 'Cut',
iconCss: 'e-icons e-cut'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Copy',
iconCss: 'e-icons e-copy'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Format Painter',
iconCss: 'e-icons e-format-painter'
}
}]
}]
},
{
header: "Gallery",
collections: [
{
items: [
{
type: RibbonItemType.Gallery,
gallerySettings: {
groups: [{
header: 'Styles',
items: [
{
content: 'Normal',
disabled: true
}, {
content: 'No Spacing'
}, {
content: 'Heading 1'
}, {
content: 'Heading 2'
}
]
}]
}
}
]
}
]
}
]
}
];
let ribbon: Ribbon = new Ribbon({
tabs: tabs
});
ribbon.appendTo("#ribbon");
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
<title>Essential JS 2 - Ribbon</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="Essential JS 2" />
<meta name="author" content="Syncfusion" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-inputs/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-lists/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-dropdowns/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-navigations/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-ribbon/styles/material.css" rel="stylesheet" />
<!--system js reference and configuration-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
<div id='loader'>LOADING....</div>
<div id='container'>
<div id="ribbon"></div>
</div>
</body>
</html>
Custom header
You can use the header property to set header for the group items in the Ribbon gallery popup.
import { Ribbon, RibbonTabModel, RibbonItemType, RibbonGallery } from "@syncfusion/ej2-ribbon";
Ribbon.Inject(RibbonGallery);
let tabs: RibbonTabModel[] = [
{
header: "Home",
groups: [
{
header: "Clipboard",
groupIconCss: 'e-icons e-paste',
collections: [{
items: [{
type: RibbonItemType.SplitButton,
splitButtonSettings: {
iconCss: 'e-icons e-paste',
items: [{ text: 'Keep Source Format' }, { text: 'Merge Format' }, { text: 'Keep Text Only' }],
content: 'Paste'
}
}]
}, {
items: [{
type: RibbonItemType.Button,
buttonSettings: {
content: 'Cut',
iconCss: 'e-icons e-cut'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Copy',
iconCss: 'e-icons e-copy'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Format Painter',
iconCss: 'e-icons e-format-painter'
}
}]
}]
},
{
header: "Gallery",
collections: [
{
items: [
{
type: RibbonItemType.Gallery,
gallerySettings: {
groups: [{
header: 'Styles',
items: [
{
content: 'Normal'
}, {
content: 'No Spacing'
}, {
content: 'Heading 1'
}, {
content: 'Heading 2'
}
]
}]
}
}
]
}
]
}
]
}
];
let ribbon: Ribbon = new Ribbon({
tabs: tabs
});
ribbon.appendTo("#ribbon");
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
<title>Essential JS 2 - Ribbon</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="Essential JS 2" />
<meta name="author" content="Syncfusion" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-inputs/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-lists/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-dropdowns/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-navigations/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-ribbon/styles/material.css" rel="stylesheet" />
<!--system js reference and configuration-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
<div id='loader'>LOADING....</div>
<div id='container'>
<div id="ribbon"></div>
</div>
</body>
</html>
Setting item width
You can use the itemWidth property to specify the width of gallery items.
Setting item height
You can use the itemHeight property to set the height of the gallery items. If the itemHeight
of the gallery item is smaller the remaining gallery items are aligned based on the itemCount specified.
The provided example demonstrates how to customize gallery items using the itemWidth
and itemHeight
properties.
import { Ribbon, RibbonTabModel, RibbonItemType, RibbonGallery } from "@syncfusion/ej2-ribbon";
Ribbon.Inject(RibbonGallery);
let tabs: RibbonTabModel[] = [
{
header: "Home",
groups: [
{
header: "Clipboard",
groupIconCss: 'e-icons e-paste',
collections: [{
items: [{
type: RibbonItemType.SplitButton,
splitButtonSettings: {
iconCss: 'e-icons e-paste',
items: [{ text: 'Keep Source Format' }, { text: 'Merge Format' }, { text: 'Keep Text Only' }],
content: 'Paste'
}
}]
}, {
items: [{
type: RibbonItemType.Button,
buttonSettings: {
content: 'Cut',
iconCss: 'e-icons e-cut'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Copy',
iconCss: 'e-icons e-copy'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Format Painter',
iconCss: 'e-icons e-format-painter'
}
}]
}]
},
{
header: "Gallery",
collections: [
{
items: [
{
type: RibbonItemType.Gallery,
gallerySettings: {
popupWidth: '350',
groups: [{
itemWidth: '100',
itemHeight: '30',
header: 'Styles',
items: [
{
content: 'Normal'
}, {
content: 'No Spacing'
}, {
content: 'Heading 1'
}, {
content: 'Heading 2'
}, {
content: 'Title'
}, {
content: 'Subtitle'
}
]
}]
}
}
]
}
]
}
]
}
];
let ribbon: Ribbon = new Ribbon({
tabs: tabs
});
ribbon.appendTo("#ribbon");
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
<title>Essential JS 2 - Ribbon</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="Essential JS 2" />
<meta name="author" content="Syncfusion" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-inputs/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-lists/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-dropdowns/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-navigations/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-ribbon/styles/material.css" rel="stylesheet" />
<!--system js reference and configuration-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
<div id='loader'>LOADING....</div>
<div id='container'>
<div id="ribbon"></div>
</div>
</body>
</html>
Group styling
You can use the cssClass property to customize the appearance of gallery groups.
import { Ribbon, RibbonTabModel, RibbonItemType, RibbonGallery } from "@syncfusion/ej2-ribbon";
Ribbon.Inject(RibbonGallery);
let tabs: RibbonTabModel[] = [
{
header: "Home",
groups: [
{
header: "Clipboard",
groupIconCss: 'e-icons e-paste',
collections: [{
items: [{
type: RibbonItemType.SplitButton,
splitButtonSettings: {
iconCss: 'e-icons e-paste',
items: [{ text: 'Keep Source Format' }, { text: 'Merge Format' }, { text: 'Keep Text Only' }],
content: 'Paste'
}
}]
}, {
items: [{
type: RibbonItemType.Button,
buttonSettings: {
content: 'Cut',
iconCss: 'e-icons e-cut'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Copy',
iconCss: 'e-icons e-copy'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Format Painter',
iconCss: 'e-icons e-format-painter'
}
}]
}]
},
{
header: "Gallery",
collections: [
{
items: [
{
type: RibbonItemType.Gallery,
gallerySettings: {
groups: [{
header: 'Styles',
cssClass: "custom-group",
items: [
{
content: 'Normal'
}, {
content: 'No Spacing'
}, {
content: 'Heading 1'
}, {
content: 'Heading 2'
}
]
}]
}
}
]
}
]
}
]
}
];
let ribbon: Ribbon = new Ribbon({
tabs: tabs
});
ribbon.appendTo("#ribbon");
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
<title>Essential JS 2 - Ribbon</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="Essential JS 2" />
<meta name="author" content="Syncfusion" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-inputs/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-lists/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-dropdowns/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-navigations/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-ribbon/styles/material.css" rel="stylesheet" />
<!--system js reference and configuration-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
<style>
.custom-group {
font-style: italic;
}
</style>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
<div id='loader'>LOADING....</div>
<div id='container'>
<div id="ribbon"></div>
</div>
</body>
</html>
Setting item count
You can customize the number if items to be displayed in Ribbon gallery by using the itemCount property. By default the itemCount
will be 3
.
The following example showcases the utilization of the itemCount
property, displaying a ribbon gallery with 4
items.
import { Ribbon, RibbonTabModel, RibbonItemType, RibbonGallery } from "@syncfusion/ej2-ribbon";
Ribbon.Inject(RibbonGallery);
let tabs: RibbonTabModel[] = [
{
header: "Home",
groups: [
{
header: "Clipboard",
groupIconCss: 'e-icons e-paste',
collections: [{
items: [{
type: RibbonItemType.SplitButton,
splitButtonSettings: {
iconCss: 'e-icons e-paste',
items: [{ text: 'Keep Source Format' }, { text: 'Merge Format' }, { text: 'Keep Text Only' }],
content: 'Paste'
}
}]
}, {
items: [{
type: RibbonItemType.Button,
buttonSettings: {
content: 'Cut',
iconCss: 'e-icons e-cut'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Copy',
iconCss: 'e-icons e-copy'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Format Painter',
iconCss: 'e-icons e-format-painter'
}
}]
}]
},
{
header: "Gallery",
collections: [
{
items: [
{
type: RibbonItemType.Gallery,
gallerySettings: {
itemCount: 4,
groups: [{
header: 'Styles',
items: [
{
content: 'Normal'
}, {
content: 'No Spacing'
}, {
content: 'Heading 1'
}, {
content: 'Heading 2'
}
]
}]
}
}
]
}
]
}
]
}
];
let ribbon: Ribbon = new Ribbon({
tabs: tabs
});
ribbon.appendTo("#ribbon");
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
<title>Essential JS 2 - Ribbon</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="Essential JS 2" />
<meta name="author" content="Syncfusion" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-inputs/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-lists/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-dropdowns/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-navigations/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-ribbon/styles/material.css" rel="stylesheet" />
<!--system js reference and configuration-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
<div id='loader'>LOADING....</div>
<div id='container'>
<div id="ribbon"></div>
</div>
</body>
</html>
Setting selected item
You can use the selectedItemIndex property to define the currently selected item in the Ribbon gallery items.
import { Ribbon, RibbonTabModel, RibbonItemType, RibbonGallery } from "@syncfusion/ej2-ribbon";
Ribbon.Inject(RibbonGallery);
let tabs: RibbonTabModel[] = [
{
header: "Home",
groups: [
{
header: "Clipboard",
groupIconCss: 'e-icons e-paste',
collections: [{
items: [{
type: RibbonItemType.SplitButton,
splitButtonSettings: {
iconCss: 'e-icons e-paste',
items: [{ text: 'Keep Source Format' }, { text: 'Merge Format' }, { text: 'Keep Text Only' }],
content: 'Paste'
}
}]
}, {
items: [{
type: RibbonItemType.Button,
buttonSettings: {
content: 'Cut',
iconCss: 'e-icons e-cut'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Copy',
iconCss: 'e-icons e-copy'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Format Painter',
iconCss: 'e-icons e-format-painter'
}
}]
}]
},
{
header: "Gallery",
collections: [
{
items: [
{
type: RibbonItemType.Gallery,
gallerySettings: {
selectedItemIndex: 1,
groups: [{
header: 'Styles',
items: [
{
content: 'Normal'
}, {
content: 'No Spacing'
}, {
content: 'Heading 1'
}, {
content: 'Heading 2'
}
]
}]
}
}
]
}
]
}
]
}
];
let ribbon: Ribbon = new Ribbon({
tabs: tabs
});
ribbon.appendTo("#ribbon");
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
<title>Essential JS 2 - Ribbon</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="Essential JS 2" />
<meta name="author" content="Syncfusion" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-inputs/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-lists/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-dropdowns/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-navigations/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-ribbon/styles/material.css" rel="stylesheet" />
<!--system js reference and configuration-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
<div id='loader'>LOADING....</div>
<div id='container'>
<div id="ribbon"></div>
</div>
</body>
</html>
Setting popup height
You can specify the height of the gallery popup by using the popupHeight property.
Setting popup width
you can specify the width of the gallery popup by using the popupWidth propery.
The example demonstrates the customization of popup with popupHeight
and popupWidth
properties.
import { Ribbon, RibbonTabModel, RibbonItemType, RibbonGallery } from "@syncfusion/ej2-ribbon";
Ribbon.Inject(RibbonGallery);
let tabs: RibbonTabModel[] = [
{
header: "Home",
groups: [
{
header: "Clipboard",
groupIconCss: 'e-icons e-paste',
collections: [{
items: [{
type: RibbonItemType.SplitButton,
splitButtonSettings: {
iconCss: 'e-icons e-paste',
items: [{ text: 'Keep Source Format' }, { text: 'Merge Format' }, { text: 'Keep Text Only' }],
content: 'Paste'
}
}]
}, {
items: [{
type: RibbonItemType.Button,
buttonSettings: {
content: 'Cut',
iconCss: 'e-icons e-cut'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Copy',
iconCss: 'e-icons e-copy'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Format Painter',
iconCss: 'e-icons e-format-painter'
}
}]
}]
},
{
header: "Gallery",
collections: [
{
items: [
{
type: RibbonItemType.Gallery,
gallerySettings: {
popupHeight: '180',
popupWidth: '350',
groups: [{
header: 'Styles',
items: [
{
content: 'Normal'
}, {
content: 'No Spacing'
}, {
content: 'Heading 1'
}, {
content: 'Heading 2'
}, {
content: 'Title'
}, {
content: 'Subtitle'
}
]
}]
}
}
]
}
]
}
]
}
];
let ribbon: Ribbon = new Ribbon({
tabs: tabs
});
ribbon.appendTo("#ribbon");
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
<title>Essential JS 2 - Ribbon</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="Essential JS 2" />
<meta name="author" content="Syncfusion" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-inputs/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-lists/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-dropdowns/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-navigations/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-ribbon/styles/material.css" rel="stylesheet" />
<!--system js reference and configuration-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
<div id='loader'>LOADING....</div>
<div id='container'>
<div id="ribbon"></div>
</div>
</body>
</html>
Template
You can customize the default appearance and content of Ribbon gallery items by using the template property.
Popup Template
You can customize the appearance of Ribbon gallery popup by using the popupTemplate property.
The below example demonstrates the customization of both the template
and popupTemplate
properties:
import { Ribbon, RibbonTabModel, RibbonItemType, RibbonGallery } from "@syncfusion/ej2-ribbon";
Ribbon.Inject(RibbonGallery);
let tabs: RibbonTabModel[] = [
{
header: "Home",
groups: [
{
header: "Clipboard",
groupIconCss: 'e-icons e-paste',
collections: [{
items: [{
type: RibbonItemType.SplitButton,
splitButtonSettings: {
iconCss: 'e-icons e-paste',
items: [{ text: 'Keep Source Format' }, { text: 'Merge Format' }, { text: 'Keep Text Only' }],
content: 'Paste'
}
}]
}, {
items: [{
type: RibbonItemType.Button,
buttonSettings: {
content: 'Cut',
iconCss: 'e-icons e-cut'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Copy',
iconCss: 'e-icons e-copy'
}
}, {
type: RibbonItemType.Button,
buttonSettings: {
content: 'Format Painter',
iconCss: 'e-icons e-format-painter'
}
}]
}]
},
{
header: "Table Styles",
collections: [
{
items: [
{
type: RibbonItemType.Gallery,
gallerySettings: {
template: '#galleryTemplate',
popupTemplate: "#galleryTemplate",
itemCount: 7,
groups: [{
header: 'Plain Tables',
items: [
{
cssClass: "plainTables_item_1"
},
{
cssClass: "plainTables_item_2"
},
{
cssClass: "plainTables_item_3"
},
{
cssClass: "plainTables_item_4"
},
{
cssClass: "plainTables_item_5"
},
{
cssClass: "plainTables_item_6"
},
{
cssClass: "plainTables_item_7"
}
]
}, {
header: 'List Tables',
items: [
{
cssClass: "listTables_item_1"
},
{
cssClass: "listTables_item_2"
},
{
cssClass: "listTables_item_3"
},
{
cssClass: "listTables_item_4"
},
{
cssClass: "listTables_item_5"
},
{
cssClass: "listTables_item_6"
},
{
cssClass: "listTables_item_7"
}
]
}]
}
}
]
}
]
},
{
header: "Insert",
collections: [
{
items: [
{
type: RibbonItemType.Button,
buttonSettings: {
content: "Above",
iconCss: "e-icons e-insert-above",
}
},
{
type: RibbonItemType.Button,
buttonSettings: {
content: "Below",
iconCss: "e-icons e-insert-below",
}
}
]
}, {
items: [
{
type: RibbonItemType.Button,
buttonSettings: {
content: "Left",
iconCss: "e-icons e-insert-left",
}
},
{
type: RibbonItemType.Button,
buttonSettings: {
content: "Right",
iconCss: "e-icons e-insert-right",
}
}
]
}
]
}
]
}
];
let ribbon: Ribbon = new Ribbon({
tabs: tabs
});
ribbon.appendTo("#ribbon");
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js"></script>
<title>Essential JS 2 - Ribbon</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta name="description" content="Essential JS 2" />
<meta name="author" content="Syncfusion" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-splitbuttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-inputs/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-lists/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-dropdowns/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-navigations/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.1.33/ej2-ribbon/styles/material.css" rel="stylesheet" />
<!--system js reference and configuration-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js"></script>
<script src="systemjs.config.js"></script>
<style>
.table {
border-collapse: collapse;
}
/* plain table styles */
.plainTables_item_1 .tableContent {
border: 1px solid black;
}
.plainTables_item_2 .tableContent,
.plainTables_item_3 .tableContent {
border: 1px solid #c1c1c1;
}
.plainTables_item_4 .row_one .tableContent {
border-top: 1px solid black;
border-bottom: 1px solid black;
}
.plainTables_item_4 .row_three .tableContent {
border-bottom: 1px solid black;
}
.plainTables_item_5 .row_one .tableContent {
border-bottom: 1px solid black;
}
.plainTables_item_5 .row_one .tableContent,
.plainTables_item_7 .row_one .tableContent {
border-bottom: 1px solid black;
}
.plainTables_item_5 .row_two .tableContent:first-child,
.plainTables_item_5 .row_three .tableContent:first-child,
.plainTables_item_7 .row_two .tableContent:first-child,
.plainTables_item_7 .row_three .tableContent:first-child{
border-right: 1px solid black;
}
/* list table styles */
.listTables_item_1 .row_one .tableContent {
border-bottom: 1px solid #83caeb;
}
.listTables_item_2 .row_one .tableContent,
.listTables_item_2 .row_two .tableContent ,
.listTables_item_2 .row_three .tableContent {
border-bottom: 1px solid #83caeb;
border-top: 1px solid #83caeb;
}
.listTables_item_3 .row_one .tableContent {
border-top: 1px solid #156082;
border-bottom: 1px solid #156082;
background-color: #156082;
color: white;
}
.listTables_item_3 .row_three .tableContent {
border-bottom: 1px solid #156082;
}
.listTables_item_5 .row_one .tableContent,
.listTables_item_7 .row_one .tableContent {
border-bottom: 1px solid white;
}
.listTables_item_5 .row_two .tableContent:first-child,
.listTables_item_5 .row_three .tableContent:first-child,
.listTables_item_7 .row_two .tableContent:first-child,
.listTables_item_7 .row_three .tableContent:first-child{
border-right: 1px solid white;
}
.listTables_item_5 .tableContent {
background-color: #156082;
color: white;
}
.listTables_item_7 .row_one .tableContent {
border-bottom: 1px solid black;
}
.listTables_item_7 .row_two .tableContent:first-child,
.listTables_item_7 .row_three .tableContent:first-child{
border-right: 1px solid black;
}
.listTables_item_4 .row_one .tableContent {
border-top: 1px solid #156082;
border-bottom: 1px solid #156082;
}
.listTables_item_4 .row_three .tableContent {
border-bottom: 1px solid #156082;
}
</style>
<script src="https://cdn.syncfusion.com/ej2/syncfusion-helper.js" type ="text/javascript"></script>
</head>
<body>
<div id='loader'>LOADING....</div>
<div id='container'>
<div id="ribbon"></div>
</div>
<script type="text/x-jsrender" id="galleryTemplate">
<div class="gallery-template ${items.cssClass}">
<table class="table">
<tbody>
<tr class="row_one">
<td class="tableContent">—</td>
<td class="tableContent">—</td>
<td class="tableContent">—</td>
<td class="tableContent">—</td>
<td class="tableContent">—</td>
</tr>
<tr class="row_two">
<td class="tableContent">—</td>
<td class="tableContent">—</td>
<td class="tableContent">—</td>
<td class="tableContent">—</td>
<td class="tableContent">—</td>
</tr>
<tr class="row_three">
<td class="tableContent">—</td>
<td class="tableContent">—</td>
<td class="tableContent">—</td>
<td class="tableContent">—</td>
<td class="tableContent">—</td>
</tr>
</tbody>
</table>
</div>
</script>
</body>
</html>
To know more about the built-in Ribbon items, please refer to the Ribbon Items section.