Reputation: 6852
So Im coming up to speed with the changes in Angular6 and I see the mention about their Material library. A few questions:
- Does Material uses its own CSS layout, rather then Bootstrap?
- What is the role of each of the two main packages
npm install --save @angular/material @angular/cdk
Upvotes: 1
Views: 1025
Reputation: 3045
- Does Material uses its own CSS layout, rather then Bootstrap?
Angular Material is not tied to any layout system. Obviously, it internally uses pure css (scss) to style its components, but you are free to use any lib (like flex-layout) or just native css flex/grid to layout your app.
- What is the role of each of the two main packages
@angular/cdk
is just an extracted logic from @angular/material
that can be used independently of Material Design. In @angular/cdk you have common building blocks like overlay, accessibility, that can be helpful to implement your own components.
Upvotes: 2
Reputation: 1
Yes Material uses its own css. But you can use Material with Bootstrap.
You can check the example from here
In this project I am using Material with Bootstrap.
Upvotes: 0
Reputation: 2872
I would look at Angular Material to be primarily a component library. While Bootstrap offers "components" as well, I look at them as being slightly different as they're just css classes applied to standard div tags and what not...
Typically in my applications I'll use Angular Material for things like cards, navbars, buttons and more! And while they do offer a "Grid List" for structuring content on the page, it's a pain to use IMHO and then I prefer to use bootstraps grid system.
In my src/styles.scss
I'll just add @import '~bootstrap/scss/bootstrap-grid';
If you're really brave and want to try ditching bootstrap all together you can try @angular/flex-layout
too...
Upvotes: 1
Reputation: 222582
- Does Material uses its own CSS layout, rather then Bootstrap?
Material CSS is based on Material Design
.Yes material uses its own CSS layout , it does not uses grid system instead Flex.
But YES
,If your a developer, you can fetch the source files of both and compile them with LESS or use this one
if you want to combine both bootstrap and material design.
- What is the role of each of the two main packages?
It depends on the way you design the site.
Upvotes: 1