This project was created to show how to create your own UI component library and call it with in a Blazor application. I used a web assembly project but everything would work the same for a Server Side project.
I was reviewing some sample projects and I notice they had to add a css link for each style sheet file they used with in the UI components. It got me wondering
"If your UI components are in a different assembly and you used CSS isolation, do you need to include the link to the _content style sheet in the main program index file?"
-
Clone this repository
git clone https://github.com/CodingWithDavid/BlazorOwnComponetLib cd BlazorOwnComponetLib
-
Open in Visual Studio or Visual Code a. With Visual Code you will need to install the C# extensions
-
Press F5
- Basic web assembly template project a. The counter page was removed
- A component library that contains a "Spinner" component a. This is a simple loader component used to demonstrate the idea of using CSS isolation in a component library
- A clone of the Blazor app that uses a Nuget Package
- The Componet lib as a nuget package