I want to design my own UI library, but it should be based on the existing Material 2 library. So just to give you an example, instead of I should be able to use which will be just overriding the css of underlying mat-checkbox. I just want to change css, it might be properties like height, width, shadow, padding etc but then I want to allow user to use Input, Output, Two-way binding as it is without writing the boiler plate code, What is the best way to achieve this. Any sort of examples will be helpful.
Asked
Active
Viewed 41 times
0
-
[Documentation](https://angular.io/guide/component-styles#deprecated-deep--and-ng-deep) – Oct 09 '19 at 07:03
-
[Other documentation](https://material.angular.io/guide/customizing-component-styles) – Oct 09 '19 at 07:03
-
@Maryannah I do understand that we can override styles of the components, but what if I want something that is equivalent of myCheckboxComponent extends MatCheckBox. I'm not able to figure out how to just override css and make it as my own component, I want to make a ui library, that can be directly consumed as
and all updated styles will be used. I couln't find how to do that using the links that you have mentioned. – Chimu Oct 09 '19 at 08:06 -
you extend the original class, use the same template, but a different style sheet. Although I wouldn't recommend building your UI library on top of another one ... – Oct 09 '19 at 08:38
-
@Maryannah the question is valid, not a duplicate, and should be reopened. It is a question about building custom components on top of angular material components, not about overriding style. – G. Tranter Oct 09 '19 at 19:44