| Crates.io | material-yew |
| lib.rs | material-yew |
| version | 0.3.0 |
| created_at | 2021-05-19 19:00:45.497457+00 |
| updated_at | 2023-01-17 16:33:41.770047+00 |
| description | Yew wrapper for Material Web Components |
| homepage | https://yew-material.web.app/ |
| repository | https://github.com/hamza1311/yew-material |
| max_upload_size | |
| id | 399705 |
| size | 786,175 |
Material Yew is a components library for Yew framework which is a wrapper around Material Web Components exposing Yew components. All modern browsers are supported. There is no support for polyfills required by Internet Explorer 11.
use material_yew::MatButton;
use yew::html;
html! {
<MatButton label="Click me!" />
};
Cargo.toml:
[dependencies]
material-yew = "0.2"
Material icons and a Material font can also be imported for full functionality.
index.html:
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet">
It's also important to note that you need viewport meta tag for the Material Components to be responsive.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Following are all the cargo features available (each feature corresponds to its respective component):
buttoncircular-progresscheckboxcircular-progress-four-colordrawertop-app-baricon-buttonfabformfieldlinear-progressiconradioswitchtop-app-bar-fixeddialoglisticon-button-toggleslidertabssnackbartextfieldtextareaselectmenufull feature enables all the components
These components respect the theming applied to Material Web Components using stylesheets. Learn about how to theme Material Web Components.
Full API documentation can be found here. Demos of components can be found here.
git checkout -b feature/fooBar)git commit -am 'Add some fooBar')git push origin feature/fooBar)