# How to remove sidebar in a custom module?

**URL:** <https://community.directus.com/t/how-to-remove-sidebar-in-a-custom-module/657>\
**Category:** Help\
**Created:** [June 26, 2025, 4:05pm UTC](https://community.directus.com/t/how-to-remove-sidebar-in-a-custom-module/657 "2025-06-26T16:05:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmad\_quvor](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/ahmad_quvor/32/310_2.png) [@ahmad\_quvor](https://community.directus.com/u/ahmad_quvor)\
**Post date:** [June 26, 2025, 4:05pm UTC](https://community.directus.com/t/how-to-remove-sidebar-in-a-custom-module/657/1 "2025-06-26T16:05:29Z")

</div>

Hello I want to remove or hide this sidebar. I only want to do this for a specific route only

 ![image](https://us1.discourse-cdn.com/flex002/uploads/directus/original/1X/bda38f806d91649962ce117ac7771f782807ecad.png)

Thanks.

---

<div class="post-metadata">

**Author:** ![ahmad\_quvor](https://sea2.discourse-cdn.com/flex002/user_avatar/community.directus.com/ahmad_quvor/32/310_2.png) [@ahmad\_quvor](https://community.directus.com/u/ahmad_quvor)\
**Post date:** [June 26, 2025, 4:36pm UTC](https://community.directus.com/t/how-to-remove-sidebar-in-a-custom-module/657/2 "2025-06-26T16:36:31Z")

</div>

This solutions works well.

```json
<template>
  <private-view title="AI Agent - Chat">
    <ChatWindow />
  </private-view>
</template>

<script>
import ChatWindow from "./components/ChatWindow.vue";

export default {
  components: {
    ChatWindow,
  },
  mounted() {
    if (window.location.pathname === "/admin/ai-agent") {
      document.body.classList.add("ai-agent-view");
    }
  },
  beforeUnmount() {
    document.body.classList.remove("ai-agent-view");
  },
};
</script>

<style>
body.ai-agent-view aside#navigation > .resize-wrapper.transition {
  display: none !important;
}
</style>

```
