All Projects → sherweb → Ngx Materialize

sherweb / Ngx Materialize

Licence: apache-2.0
Angular wrap around Materialize library

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Ngx Materialize

Material
A lightweight Material Design library for Angular based on Google's Material Components for the Web.
Stars: ✭ 143 (-55.59%)
Mutual labels:  material-design, material, ngx
React Native Snackbar
🍱 Material Design "Snackbar" component for Android and iOS.
Stars: ✭ 613 (+90.37%)
Mutual labels:  material-design, material, component
Epiboard
Web Extension — A new tab page extension with material design and useful features 🆕 🎉
Stars: ✭ 262 (-18.63%)
Mutual labels:  material-design, material
Sequent
A simple continuous animation library for Android UI.
Stars: ✭ 263 (-18.32%)
Mutual labels:  material-design, material
Progressstatusbar
Another way to show progress. A progress View over the system StatusBar.
Stars: ✭ 283 (-12.11%)
Mutual labels:  material-design, material
Alyle Ui
Minimal Design, a set of components for Angular 9+
Stars: ✭ 234 (-27.33%)
Mutual labels:  material-design, material
Responsive scaffold
Responsive Scaffold - On mobile it shows a list and pushes to details and on tablet it shows the List and the selected item. Maintainer: @rodydavis
Stars: ✭ 238 (-26.09%)
Mutual labels:  material-design, material
Material Motion Js
Reusable gestural interactions in JavaScript. In development.
Stars: ✭ 277 (-13.98%)
Mutual labels:  material-design, material
Material Backdrop
A simple solution for implementing Backdrop pattern for Android
Stars: ✭ 221 (-31.37%)
Mutual labels:  material-design, material
Material Bread
Cross Platform React Native Material Design Components
Stars: ✭ 287 (-10.87%)
Mutual labels:  material-design, material
Framework7
Full featured HTML framework for building iOS & Android apps
Stars: ✭ 16,560 (+5042.86%)
Mutual labels:  material-design, material
Materia Theme
A Material Design theme for GNOME/GTK based desktop environments
Stars: ✭ 3,177 (+886.65%)
Mutual labels:  material-design, material
Motion Shapeofview
Explain how to use MotionLayout with ShapeOfView
Stars: ✭ 236 (-26.71%)
Mutual labels:  material-design, material
Hexo Theme Fluid
🌊 一款 Material Design 风格的 Hexo 主题 / An elegant Material-Design theme for Hexo
Stars: ✭ 3,700 (+1049.07%)
Mutual labels:  material-design, material
Materiallettericon
Material first letter icon like lollipop contacts icon. Letter(s) on a shape drawn on canvas.
Stars: ✭ 255 (-20.81%)
Mutual labels:  material-design, material
Angularmaterialfirebase
🔥 Full stack starter app with Angular 8, Material Design and Firebase (+ demo)
Stars: ✭ 229 (-28.88%)
Mutual labels:  material-design, ngx
Githubfollows
A demo project based on MVVM architecture and material design & animations.
Stars: ✭ 272 (-15.53%)
Mutual labels:  material-design, material
Material Showcase Ios
✨ An elegant way to guide your beloved users in iOS apps - Material Showcase.
Stars: ✭ 300 (-6.83%)
Mutual labels:  material-design, material
Yoshino
A themable React component library!Flexible Lightweight PC UI Components built on React! Anyone can generate easily all kinds of themes by it!
Stars: ✭ 216 (-32.92%)
Mutual labels:  material-design, component
Material Admin
Free Material Admin Template
Stars: ✭ 219 (-31.99%)
Mutual labels:  material-design, material

ngx-materialize

CircleCI Status AppVeyor Status NPM Version License

This library is an Angular wrap around Materialize library, a responsive CSS/JS framework that implements Material Design specifications from Google.

Demo and documentation : https://sherweb.github.io/ngx-materialize/

Why ngx-materialize?

The main purpose of this library is to simplify the usage of Materialize within the Angular framework which make it more dynamic. To illustrate this, we have Playground sections in several component demo pages.

In other words, we ...

  • Simplify components usage
  • Initialize components automatically
  • Handle Angular "quirks" with Materialize library
  • Offer component injection when possible
  • Provide a MediaService that allow customization according to view port size
  • Add support for ReactiveForm with validation

Table of contents

Installation

The following commands will add ngx-materialize library to your package.json file along with its dependencies: Materialize CSS and jQuery.

npm install --save ngx-materialize

Don't forget to include Materialize and jQuery in your application.

If you are using Angular-CLI you can follow the example below :

angular.json

"styles": [
  "src/styles.scss",
+ "node_modules/materialize-css/dist/css/materialize.min.css"
],
"scripts": [
+ "node_modules/jquery/dist/jquery.min.js",
+ "node_modules/materialize-css/dist/js/materialize.min.js"
],

tsconfig

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "module": "es2015",
    "types": [
+      "jquery",
+      "materialize-css"
    ]
  },
  "exclude": [
    "src/test.ts",
    "**/*.spec.ts"
  ]
}

See also Angular CLI 3rd Party Library Installation and Using MaterializeCSS with your Angular 2 Angular CLI App.

Icons

Ngx-materialize offers two "out-of-the-box" options for icons although you are free to use the library of your choice.

Material Design Icons

To use Material Design Icons (community project based on Google Material Icons with lots of added icons), which is used with mz-icon-mdi directive, you will need to add the library with the following command:

npm install --save @mdi/font

Don't forget to include Mdi library to your application.

If you are using Angular-CLI you can follow the example below :

angular.json

"styles": [
  "src/styles.scss",
  "node_modules/materialize-css/dist/css/materialize.min.css",
+ "node_modules/@mdi/font/css/materialdesignicons.min.css"
],

Material Icons

To use Material Icons (official Google Material Icons library), which is used with mz-icon directive, you will need to add the following into the <head> tag of your index.html file:

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

Animation

Some components are using advance animation transition. You need to install @angular/animations and include BrowserAnimationsModule if you want those animation to work.

npm install --save @angular/animations
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { AppModule } from './app.module';

@NgModule({
  imports: [
+    BrowserAnimationsModule,
  ],
})
export class AppModule { }

If you don't want to install a new dependency in your application, you can include NoopAnimationsModule.

import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
+ import { NoopAnimationsModule } from '@angular/platform-browser/animations';

import { AppModule } from './app.module';

@NgModule({
  imports: [
+    NoopAnimationsModule,
  ],
})
export class AppModule { }

Usage

You must import component module you want to use inside your module to be able to use Materialize components.

import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
+ import { MzButtonModule, MzInputModule } from 'ngx-materialize';

import { HomeComponent } from './home.component';

@NgModule({
  imports: [
    CommonModule,
+   MzButtonModule,
+   MzInputModule,
  ],
  declarations: [ HomeComponent ],
})
export class HomeModule { }

MaterializeModule deprecated

We will continue to maintain this module for a period of time to allow you to migrate your existing components to the new way. We recommend to use the new component modules when you are building new component/application.

If you still want to import only one module, you can create a separate NgModule in your application that imports all the ngx-materialize components. You will be able to include this module anywhere you like to use the components.

import { MzInputModule, MzValidationModule } from 'ngx-materialize';

@NgModule({
  imports: [
    MzInputModule,
    MzValidationModule,
  ],
  exports: [
    MzInputModule,
    MzValidationModule,
  ],
})
export class CustomMaterializeModule { }

Available features

Page listed in Native CCS Class will not be wrapped.

Components

  • Badge
  • Button
  • Card
  • Checkbox
  • Chip
  • Collapsible
  • Collection
  • Datepicker
  • Dropdown
  • Feature discovery
  • Form validation
  • Icon
  • Input
  • Modal
  • Navbar
  • Pagination
  • Parallax
  • Progress
  • Radio-Button
  • Select
  • Sidenav
  • Spinner
  • Switch
  • Tab
  • Textarea
  • Timepicker
  • Toast
  • Tooltip

Services

  • Media

Demo application

A demo application is available at https://sherweb.github.io/ngx-materialize/, or refer to the ./demo folder and its README.

Road map

We (at SherWeb) are currently wrapping the components as we need them, and unfortunately, we cannot provide a specific road map.

If some components are missing, feel free to contribute.

Contribute

Contributions are always welcome.

Make sure that :

  • Your code style matches with the rest of the project
  • Unit tests pass
  • Linter passes

And you are ready to go!

Credits

Thanks to Ali Mohammadi for donating the npm package name.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].