--- title: "Side Window" slug: "visitor-side-api-side-window" updated: 2022-03-11T09:13:12Z published: 2022-03-11T09:13:13Z canonical: "developer.comm100.com/visitor-side-api-side-window" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Side Window ## Side Window ### Display To see if side window is visible, you could use the following API: ``` /** @type {boolean} */ const isVisible = Comm100API.get('livechat.sideWindow.isVisible'); ``` To set the visibility of side window, you could use the following API: ``` /** @type {boolean} */ const isVisible = true; Comm100API.set('livechat.sideWindow.isVisible', isVisible); ``` If you are interested in the display event of side window, you could use one of the following APIs: ``` Comm100API.on('livechat.sideWindow.show', function () { }); Comm100API.on('livechat.sideWindow.hide', function () { }); ``` ### Tab To get all available tabs of side window, you could use API: ``` /** @type {Array} */ const tabs = Comm100API.get('livechat.sideWindow.tabs'); ``` Here, the API will return a list of objects representing available tabs, where each has one of the following structures: - System tab ``` const tab = { id: '', // string, id of tab isSystem: true, // boolean, whether tab is from system 'aria-label': '', // aria-label that will be used for this tab icon }; ``` - Custom tab ``` const tab = { id: '', // string, id of tab isSystem: false, // boolean content: function () { const component = document.createElment('div'); return component; }, iconImg: '', // string, url of image, which will be used to display icon in tab 'aria-label': '', // aria-label that will be used for this icon } ``` Here, `content` should be a callback function to generate custom HTMLElement. You could also use the following API to set all tabs: ``` const tabs = []; Comm100API.set('livechat.sideWindow.tabs', tabs); ``` To listen to tab switch events, you could use the following API: ``` Comm100API.on('livechat.sideWindow.tabs.switch', function(currentTabId) {}); ``` Selected tab id will be provided when callback triggered.