Is there a way to use Css files outside the assets folder? / Have multiple assets folders

Hi guys so I have been working on quite a big project and it’s really messy to put all the CSS files inside one folder when my project is divided into a lot of folders for example:

-- assets # folder
-- components # folder
  -- Header # folder
  -- Body # folder
    -- Pages # folder
  -- SideNavBar # folder
  -- Footer # folder

And it goes on and on to different components, now I am searching for a solution like The way we work with CSS in react, put the CSS of the files that use it in the same folder import the CSS, and use it. or open an assets folder for each big component like header, footer, side navbar, and so on…

Thanks for taking your time reading! if you have an idea please do share it!

1 Like


Have you figured it out yet? I thought that the assets folder could have nested subfolders with stylesheets, but maybe I am wrong…

One alternative to keep both css and python modules for components in the same location could be to change assets folder in Dash to “.” and let it scan your entire project dir (you can exclude some regex patterns as well). More info here

THANK YOU SO MUCH! I have searched for this solution for so long!