Contents
- Show or hide footer
- Footer template
Having trouble getting help?
Contact Support
Contact Support
Footer in EJ2 TypeScript Chat UI control
17 Dec 20243 minutes to read
Show or hide footer
You can use showFooter property to enable or disable the chat footer.
import { ChatUI, UserModel, MessageModel } from '@syncfusion/ej2-interactive-chat';
import { enableRipple } from '@syncfusion/ej2-base';
enableRipple(true);
let currentUserModel: UserModel = {
id: "user1",
user: "Albert"
};
let michaleUserModel: UserModel = {
id: "user2",
user: "Michale Suyama"
};
let chatMessages: MessageModel[] = [
{
author: currentUserModel,
text: "Hi Michale, are we on track for the deadline?"
},
{
author: michaleUserModel,
text: "Yes, the design phase is complete."
},
{
author: currentUserModel,
text: "I’ll review it and send feedback by today."
}
];
// Initializes the Chat UI control
let chatUI: ChatUI = new ChatUI({
messages: chatMessages,
user: currentUserModel,
showFooter: false
});
// Render initialized Chat UI.
chatUI.appendTo('#showFooter');
<!DOCTYPE html>
<html lang="en">
<head>
<title>EJ2 Chat UI</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="TypeScript Chat UI Control" />
<meta name="author" content="Syncfusion" />
<link href="index.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.2.4/ej2-base/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.2.4/ej2-inputs/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.2.4/ej2-buttons/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.2.4/ej2-navigations/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.2.4/ej2-popups/styles/material.css" rel="stylesheet" />
<link href="https://cdn.syncfusion.com/ej2/29.2.4/ej2-interactive-chat/styles/material.css" rel="stylesheet" />
<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' style="height: 380px; width: 450px;">
<div id="showFooter"></div>
</div>
</body>
</html>
Footer template
Refer to the Templates section for more details about the footer template.