Add Custom Css or Js In Admin Magento 2

Sometimes you want to modify the admin panel because it is boring for you, today I will show you how to add custom js and CSS in the admin panel.

Step 1: Create a module for example Vendor/Module

Step 2: Create a new file view/adminhtml/layout/default.xml in the module

<?xml version="1.0"?>
<page xmlns:xsi="" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<css src="Vendor_Module::css/test.css"/>
<script src="Vendor_Module::js/test.js"/>

Step 3: Add .css file and add js file in web folder as below path



Done, hope this article will help you in some way, see you in the next post.