Write a common source code for many websites

I want to write a common source code for many websites. That is, the core component will be shared, only the UI design will be different. The same source I have for delivery to many websites with different UIs.
Example: I will have registration, login, home page with predefined router. At that time, I will configure site A with a different logo, color and some changes in login, register, completely change the homepage interface. If I have 20 sites, I only need to create 20 configs for the style and create my own custom files to override.
Any ideas or framework to support this?
Thank you and regards

You could publish a private npm package that holds all of your reusable components and simply add that package to any/all of your applications. You could also create a github repo that’s just an application template to start from.