--- title: "opening/closing" slug: "openingclosing" updated: 2024-02-13T05:43:57Z canonical: "docx.syndigo.com/openingclosing" --- > ## Documentation Index > Fetch the complete documentation index at: https://docx.syndigo.com/llms.txt > Use this file to discover all available pages before exploring further. # opening/closing You can set the open attribute, which will cause the mosaic to open(Determines if the mosaic is open or closed) or close: ``` const m = document.querySelector('syndigo-mosaic') m.setAttribute('open', '') // opens the mosaic m.removeAttribute('open') // closes the mosaic ``` You can also detect if the mosaic is currently open or closed: ``` const isMosaicOpen = !!m.getAttribute('open') // true or false ```