Lightweight CSS framework

Overview

Material Design CSS Framework

MUI

MUI is a lightweight CSS framework that follows Google's Material Design guidelines.

Join the chat at https://gitter.im/muicss/mui Build Status Dependency Status devDependency Status CDNJS Greenkeeper badge Gitpod Ready-to-Code

Use From the CDN:

<link href="//cdn.muicss.com/mui-0.10.3/css/mui.min.css" rel="stylesheet" type="text/css" />
<script src="//cdn.muicss.com/mui-0.10.3/js/mui.min.js"></script>

Or for development you can use the latest:

<link href="//cdn.muicss.com/mui-latest/css/mui.min.css" rel="stylesheet" type="text/css" />
<script src="//cdn.muicss.com/mui-latest/js/mui.min.js"></script>

Install with NPM:

$ npm install --save muicss

Read more: https://www.npmjs.com/package/muicss

Install with Bower:

$ bower install mui

Features

MUI is designed from the ground up to be fast, small and developer friendly. By design it only includes the basic components you need to build a site that follows Google's Material Design guidelines. Some of the key features of MUI are:

  • Small footprint: mui.min.css - 6.6K, mui.min.js - 5.4K (gzipped)
  • A responsive grid to make mobile-friendly sites
  • No external dependencies
  • CSS library that can be customized with your own colors
  • JS library can be loaded asyncronously
  • Email library for styling HTML emails

To get started using MUI, go to the MUI website to see examples and download boilerplate HTML.

Browser Support

MUI is tested and works in:

  • IE10+
  • Latest Stable: Firefox, Chrome, Safari
  • iOS 6+

Development Quickstart

  1. Install dependencies
  1. Clone repository

    $ git clone [email protected]:muicss/mui.git
    $ cd mui
  2. Install node dependencies using npm

    $ npm install
  3. Build examples

    $ npm run build-examples

    To view the examples you can use any static file server. To use the nodejs http-server module:

    $ npm install http-server
    $ npm run http-server -- -p 3000

    Then visit http://localhost:3000/examples

Alternatively, you can use a pre-configured development environment on GitPod:

Open in Gitpod

Run tests

Unit tests

To run the unit tests from the command line, run 'npm test':

$ npm test

E2E tests

To run the E2E tests first compile the unit test files into a version that runs in the browser:

$ npm run build-e2e-tests

Then visit http://localhost:3000/e2e-tests

Build Packages

CDN

$ npm run build-cdn

The build will be located in the packages/cdn directory:

cdn/
├── angular
│   ├── mui-angular.js
│   └── mui-angular.min.js
├── css
│   ├── mui.css
│   ├── mui.min.css
│   ├── mui-rtl.css
│   └── mui-rtl.min.css
├── email
│   ├── mui-email-inline.css
│   ├── mui-email-inline-rtl.css
│   ├── mui-email-styletag.css
│   └── mui-email-styletag-rtl.css
├── extra
│   ├── mui-angular-combined.js
│   ├── mui-angular-combined.min.js
│   ├── mui-colors.css
│   ├── mui-colors.min.css
│   ├── mui-combined.js
│   ├── mui-combined.min.js
│   ├── mui-noglobals.css
│   ├── mui-noglobals.min.css
│   ├── mui-noglobals-rtl.css
│   ├── mui-noglobals-rtl.min.css
│   ├── mui-react-combined.js
│   └── mui-react-combined.min.js
├── js
│   ├── mui.js
│   └── mui.min.js
├── react
│   ├── mui-react.js
│   └── mui-react.min.js
└── webcomponents
    ├── mui-webcomponents.js
        └── mui-webcomponents.min.js

NPM

$ npm run build-npm

The NPM package is located in the packages/npm directory.

Meteor

$ npm run build-meteor

The Meteor package is located in the packages/meteor directory.

Comments
  • Float label not detecting autocomplete from chrome

    Float label not detecting autocomplete from chrome

    I used the float label input for username and password. When the page is loaded in chrome it is autofilled and for the password field, the float label overlaps the autofilled password.

    screen shot 2016-09-06 at 16 17 04

    bug help wanted priority: high 
    opened by randomcatgamer 39
  • Proposal: Use data-attributes instead of classes

    Proposal: Use data-attributes instead of classes

    Hi Everyone,

    In some cases, using HTML classes to markup components feels awkward. One option is to use data-attributes instead. Here are some examples of what MUI markup would look like with data-attributes instead of classes:

    Button colors

    Classes:

    <button class="mui-btn mui-btn-default">Button</button>
    <button class="mui-btn mui-btn-primary">Button</button>
    

    Data-attributes:

    <button class="mui-btn" data-mui-color="default">Button</button>
    <button class="mui-btn" data-mui-color="primary">Button</button>
    

    Button styles

    Classes:

    <button class="mui-btn mui-btn-default mui-btn-raised">Button</button>
    <button class="mui-btn mui-btn-default mui-btn-flat">Button</button>
    

    Data-attributes:

    <button class="mui-btn" data-mui-color="default" data-mui-style="raised">Button</button>
    <button class="mui-btn" data-mui-color="default" data-mui-style="flat">Button</button>
    

    Let me know your thoughts on data-attributes syntax!

    Andres

    question 
    opened by amorey 26
  • InputText value & defaultValue Problem.

    InputText value & defaultValue Problem.

    Summary: value attr should be taken from state. I am planning to change it that way and implement componentShouldUpdate

    Here is the scenario. I have a grid.

    1. Selection + Edit button renders a form.
    2. Form must be rendered with the values from selection.
    3. Form must be able to re-render it self if we do 1st step again (change selection & click edit)
    4. Form values must be editable after render.

    So as a know , defaultValue renders only for the first time. So if I set selected values to defaultValue attr it will not be rendered again after selection changes. value attr renders everytime so it will be updated after my new selection but it is becoming editable=false by the nature of the React. I added onChange props to the component, it is not throwing any warning log also it is not reflecting by value change to the field. So only solution is to render form on every onChange.

    handleChange = (code,event)=> {
            console.log(event);
            var state = {};
            state[code] = event.target.value;
            this.setState(state);
    };
    

    Here is the ss for better explaining what I did. screen shot 2016-02-04 at 15 56 26

    opened by serayuzgur 24
  • Which files need to be hosted?

    Which files need to be hosted?

    Hello @amorey , I am the member of cdnjs project. We want to host this library. But there is a question want to ask. I want to confirm with you about the main file need to be grab on npm. I found that there are both mui.js and mui.css on github. So I think the main files which is needed to be grab are these two files, right? But I just found that mui.css under lib/css/. How about mui.js? Please help me confirm this. Thanks for your help!

    https://github.com/cdnjs/cdnjs/issues/8334

    low hanging fruit priority: high 
    opened by kennynaoh 22
  • Proposal: React Library Spec

    Proposal: React Library Spec

    Hi Everyone,

    We're planning an upgrade to the MUI React library to make it production-ready. Please let us know what you think of this spec:

    Components

    Appbar

    <Appbar/>
    

    Buttons

    <Button/>
      * {String} color=default|primary|danger|accent
      * {String} variant=default|flat|raised|fab
      * {String} size=default|small|large
      * {Boolean} isDisabled=false|true
    

    Caret

    <Caret/>
    

    Container

    <Container/>
      * {Boolean} isFluid=false|true
    

    Dividers

    <Divider/>
    

    Dropdowns

    <Dropdown/>
      * {String} color=default|primary|danger|accent
      * {String} variant=default|flat|raised|fab
      * {String} size=default|small|large
      * {String} label
      * {String} alignMenu=left|right
      * {Function} onClick
      * {Boolean} isDisabled
    
    <DropdownItem/>
      * {String} link
      * {Function} onClick
    

    Forms

    <Form/>
      * {Boolean} isInline=false|true
    
    <TextInput/>
      * {String} type=text|email|password
      * {String} hint
      * {String} label
      * {Boolean} isLabelFloating=false|true
      * {Boolean} isRequired=false|true
    
    <TextareaInput/>
      * {Integer} rows
      * {String} hint
      * {String} label
      * {Boolean} isLabelFloating=false|true
      * {Boolean} isRequired=false|true
    
    <Checkbox/>
      * {String} value
      * {String} label
      * {Boolean} isChecked=false|true
      * {Boolean} isDisabled=false|true
    
    <Radio/>
      * {String} name
      * {String} value
      * {Boolean} isChecked=false|true
      * {Boolean} isDisabled=false|true
    
    <Select/>
      * {String} name
      * {Boolean} isAutofocus=false|true
      * {Boolean} isDisabled=false|true
      * {Boolean} isMultiple=false|true
      * {Boolean} isRequired=false|true
      * {Boolean} useDefault=false|true
      * {Function} onChange
    
    <SelectItem/>
      * {String} value
      * {String} label
    

    Grid

    <Row/>
    
    <Col/>
      * {Integer} xs
      * {Integer} xs-offset
      * {Integer} sm
      * {Integer} sm-offset
      * {Integer} md
      * {Integer} md-offset
      * {Integer} lg
      * {Integer} lg-offset
    

    Panel

    <Panel/>
    

    Tabs

    <Tabs/>
      * {Integer} initialSelectedIndex=0
      * {Boolean} isJustified=false|true
      * {Function} onChange
    
    <Tab/>
      * {String} label
      * {String} value
      * {Function} onActive
    

    CSS Helpers

    <!-- animation -->
    <div className="mui--no-transition"></div>
    
    <!-- alignment -->
    <div className="mui--text-left"></div>
    <div className="mui--text-right"></div>
    <div className="mui--text-center"></div>
    <div className="mui--text-justify"></div>
    <div className="mui--text-nowrap"></div>
    <div className="mui--align-baseline"></div>
    <div className="mui--align-top"></div>
    <div className="mui--align-middle"></div>
    <div className="mui--align-bottom"></div>
    
    <!-- depth helpers -->
    <div className="mui--z1"></div>
    <div className="mui--z2"></div>
    <div className="mui--z3"></div>
    <div className="mui--z4"></div>
    <div className="mui--z5"></div>
    
    <!-- float helpers -->
    <div className="mui--clearfix"></div>
    <div className="mui--pull-right"></div>
    <div className="mui--pull-left"></div>
    
    <!-- toggle helpers -->
    <div className="mui--hide"></div>
    <div className="mui--show"></div>
    <div className="mui--invisible"></div>
    <div className="mui--overflow-hidden"></div>
    
    <!-- responsive utilities -->
    <div className="mui--visible-xs-block"></div>
    <div className="mui--visible-xs-inline"></div>
    <div className="mui--visible-xs-inline-block"></div>
    <div className="mui--visible-sm-block"></div>
    <div className="mui--visible-sm-inline"></div>
    <div className="mui--visible-sm-inline-block"></div>
    <div className="mui--visible-md-block"></div>
    <div className="mui--visible-md-inline"></div>
    <div className="mui--visible-md-inline-block"></div>
    <div className="mui--visible-lg-block"></div>
    <div className="mui--visible-lg-inline"></div>
    <div className="mui--visible-lg-inline-block"></div>
    <div className="mui--hidden-xs"></div>
    <div className="mui--hidden-sm"></div>
    <div className="mui--hidden-md"></div>
    <div className="mui--hidden-lg"></div>
    
    <!-- typograpy -->
    <div className="mui--text-display4"></div>
    <div className="mui--text-display3"></div>
    <div className="mui--text-display2"></div>
    <div className="mui--text-display1"></div>
    <div className="mui--text-headline"></div>
    <div className="mui--text-title"></div>
    <div className="mui--text-subhead"></div>
    <div className="mui--text-body2">Body2</div>
    <div className="mui--text-body1">Body1</div>
    <div className="mui--text-caption">Caption</div>
    <div className="mui--text-menu">Menu</div>
    <div className="mui--text-button">Button</div>
    
    <!-- text color -->
    <div className="mui--text-dark-primary"></div>
    <div className="mui--text-dark-secondary"></div>
    <div className="mui--text-dark-hint"></div>
    
    <div className="mui--text-light-primary"></div>
    <div className="mui--text-light-secondary"></div>
    <div className="mui--text-light-hint"></div>
    
    <div className="mui--text-accent"></div>
    <div className="mui--text-accent-fallback"></div>
    
    <div className="mui--text-danger"></div>
    
    <!-- user select -->
    <div className="mui--no-user-select"></div>
    
    <!-- appbar dimension helpers -->
    <div className="mui--appbar-height"></div>
    <div className="mui--appbar-min-height"></div>
    <div className="mui--appbar-line-height"></div>
    
    <!-- list helpers -->
    <ul className="mui-list--unstyled"></ul>
    <ul className="mui-list--inline"></ul>
    

    JavaScript API

    Overlay

    <script>
      mui.overlay('on'[, <options>[, <childEl>]]);
      mui.overlay('off');
    </script>
    
    question 
    opened by amorey 21
  • Tab events

    Tab events

    Hi,

    I'd like to attach a handler for when a tab is activated (because I have some flot charts that need to be redrawn).

    Is there an existing event that I can attach to?

    thanks

    question 
    opened by igitur 20
  • Angular: <mui-input> validation doesn't work correctly with type=

    Angular: validation doesn't work correctly with type="email"

    It looks like there is a validation issue with email inputs using the <mui-input> directive.

    As you can see in this JSBin, if you type an invalid email, the wrapper div.mui-textfield still has the .ng-valid class while the inner input has .ng-invalid and .ng-invalid-email classes, plus the wrapper has the .ng-empty class while the inner input has an .ng-not-empty class and an .mui--is-empty class. And obviously, the floating label overlaps with the text input content because it thinks it's empty (because that's what the html classes tells!).

    It made me laugh at first, but overall this is a complete mess and a pain to work around in application code. I did take a look at the source code of the directive but found nothing shockingly wrong, so I think the issue has more to do with the way angular input updates bubbles up to the wrapper div.mui-textfield.

    EDIT: I'm not sure how this works, but this line updates the ng-model value but I'm almost certain it's not updating html classes.

    bug priority: high 
    opened by ClementParis016 16
  • Error when DOM node's are removed

    Error when DOM node's are removed

    I'm getting a website breaking error:

    mui.js:1617 Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
    

    It happens when my router removes content from a DOM node and appends new content to the same node.

    opened by Thermatix 15
  • Disable global styles.

    Disable global styles.

    I'm trying to use the React components in a WordPress plugin but the global styles are conflicting with the WordPress styles. I was wondering if there was a way to disable the styles that aren't prefixed? From that I could tell there isn't. It would be nice to be able to just use the components.

    Thanks!

    enhancement help wanted discussion 
    opened by octalmage 14
  • Erasing textfield value using jQuery doesn't reset floating labels

    Erasing textfield value using jQuery doesn't reset floating labels

    I am emptying a textfield's value using jQuery ($(textfield).val('');) but the floating label remains floating above the empty textfield. Sending the change event via jQuery ($(textfield).change();) doesn't cause the label to update.

    opened by alihamze 14
  • Open Dropdown Menu on Top When Dropdown is on Bottom Part of the Page or Screen

    Open Dropdown Menu on Top When Dropdown is on Bottom Part of the Page or Screen

    Hello and Good day. I'm using muicss for my own project and I noticed some issue. The dropdown menu always open at the bottom even it is not visible on the viewport / screen.

    opened by jovanidash21 13
  • Support for react 17

    Support for react 17

    Hi everybody!

    I was wondering if it would be possible to bump the peer dependency version up to react 17?

    React 17 only contains a minimal amount of breaking changes, so I don't think a lot (or any) reworking is required for this change.

    opened by SirRegion 2
  • Dark mode support via automatic CSS media query prefers-color-scheme

    Dark mode support via automatic CSS media query prefers-color-scheme

    Hey,

    all major browsers have supported the prefers-color-scheme CSS media query for over a year now. Would it be a good idea for mui to also support this functionality? In essence the web site would have two themes, a light and a dark, and the end user's browser chooses automatically which one to use based on user preference and/or system settings.

    If this functionality is welcome, any tips on how to implement it?

    opened by tonimelisma 1
  • Update gulp-rtlcss to the latest version 🚀

    Update gulp-rtlcss to the latest version 🚀


    ☝️ Important announcement: Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


    The devDependency gulp-rtlcss was updated from 1.4.0 to 1.4.1.

    This version is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.


    Publisher: jjlharrison License: MIT

    Release Notes for v1.4.1
    Commits

    The new version differs by 5 commits.

    See the full diff


    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 0
  • Update jsdom to the latest version 🚀

    Update jsdom to the latest version 🚀

    The devDependency jsdom was updated from 15.2.1 to 16.0.1.

    This version is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.


    Publisher: domenic License: MIT

    Release Notes for Version 16.0.1
    • Fixed Node v10 and v11 support when runScripts was set.
    • Fixed the behavior when changing an <input>'s type="" attribute.
    • Fixed input validation behavior for <input type="range"> when max="" is less than min="".
    Commits

    The new version differs by 52 commits.

    • afc85c8 Version 16.0.1
    • 6472db4 Fix Node v10 and Node v11 support
    • 16c9856 Improved "expected fail" messages for web platform tests
    • e2dbad8 Add support for reverse range validation
    • 94b40d3 Implement type state switch logic
    • c292572 Add comment about radio button activation muddiness
    • 52109d5 Clean up typeMismatch constraint validation
    • 4a374e5 Clean up _defaultStepBase in
    • 92e9adb Consistently use ._value for constraint validation
    • 11664ca More consistent applicability checking for attributes
    • b097c0a Roll Web Platform Tests
    • d240291 Remove unnecessary dependencies
    • 902b69e Version 16.0.0
    • 020539e Remove document.origin and add window.origin
    • 678141f Use mutability as a measure for valueMissing constraint

    There are 52 commits in total.

    See the full diff


    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 0
Owner
Lightweight CSS framework that follows Google's Material Design guidelines
null
Framework-agnostic CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation

Aphrodite Framework-agnostic CSS-in-JS with support for server-side rendering, browser prefixing, and minimum CSS generation. Support for colocating y

Khan Academy 5.3k Jan 1, 2023
Tiny CSS framework with almost no classes and some pure CSS effects

no.css INTERACTIVE DEMO I am tired of adding classes to style my HTML. I just want to include a .css file and I expect it to style the HTML for me. no

null 96 Dec 10, 2022
Reseter.css - A Futuristic CSS Reset / CSS Normalizer

Reseter.css A CSS Reset/Normalizer Reseter.css is an awesome CSS reset for a website. It is a great tool for any web designer. Reseter.css resets all

Krish Dev DB 1.1k Jan 2, 2023
A lightweight and modular front-end framework for developing fast and powerful web interfaces

UIkit UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces. Homepage - Learn more about UIkit @getui

null 17.7k Jan 8, 2023
The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

Bootstrap Sleek, intuitive, and powerful front-end framework for faster and easier web development. Explore Bootstrap docs » Report bug · Request feat

Bootstrap 161k Jan 1, 2023
Modern CSS framework based on Flexbox

Bulma Bulma is a modern CSS framework based on Flexbox. Quick install Bulma is constantly in development! Try it out now: NPM npm install bulma or Yar

Jeremy Thomas 46.6k Dec 31, 2022
A utility-first CSS framework for rapid UI development.

A utility-first CSS framework for rapidly building custom user interfaces. Documentation For full documentation, visit tailwindcss.com. Community For

Tailwind Labs 63.5k Dec 30, 2022
Materialize, a CSS Framework based on Material Design

MaterializeCSS Materialize, a CSS Framework based on material design. -- Browse the docs -- Table of Contents Quickstart Documentation Supported Brows

Alvin Wang 38.8k Jan 2, 2023
A minimalist CSS framework.

A minimalist CSS framework. Why it's awesome Milligram provides a minimal setup of styles for a fast and clean starting point. Just it! Only 2kb gzipp

Milligram 9.9k Jan 4, 2023
The Less Formal CSS Framework

PaperCSS The less formal CSS framework, with a quick and easy integration. Table of contents Table of contents Quick-start Status Content of the frame

PaperCSS 3.8k Jan 4, 2023
A classless CSS framework to write modern websites using only HTML.

new.css new.css A classless CSS framework to write modern websites using only HTML. It weighs 4.8kb. All it does is set some sensible defaults and sty

null 3.6k Jan 3, 2023
Front-end framework with a built-in dark mode and full customizability using CSS variables; great for building dashboards and tools.

This is the main branch of the repo, which contains the latest stable release. For the ongoing development, see the develop branch. Halfmoon Front-end

Tahmid (Halfmoon UI) 2.8k Dec 26, 2022
Feature rich CSS framework for the new decade https://shorthandcss.com

Shorthand Shorthand is a CSS framework and does not include any javascript. You can customize the framework by using .scss only. Size Dist File URL Li

Shorthand 251 Sep 24, 2022
A new flexbox based CSS micro-framework.

Strawberry CSS What Strawberry is a new flexbox based CSS micro-framework. A set of common flexbox's utilities focused on making your life easier and

Andrea Simone Costa 74 Sep 26, 2022
A utility-first CSS framework for rapid UI development.

A utility-first CSS framework for rapidly building custom user interfaces. Documentation For full documentation, visit tailwindcss.com. Community For

Tailwind Labs 63.5k Jan 1, 2023
NES-style CSS Framework | ファミコン風CSSフレームワーク

日本語 / 简体中文 / Español / Português / Русский / Français NES.css is a NES-style(8bit-like) CSS Framework. Installation Styles NES.css is available via ei

null 19.2k Jan 5, 2023
A starter CSS framework that actually looks good.

Mustard UI Mustard is a starter CSS framework that actually looks good. Getting Started Mustard UI is currently in release v1.0. Try it out today and

Kyle Logue 1k Dec 28, 2022
Low-level CSS Toolkit – the original Functional/Utility/Atomic CSS library

Basscss Low-level CSS toolkit – the original Functional CSS library https://basscss.com Lightning-Fast Modular CSS with No Side Effects Basscss is a l

Basscss 5.8k Dec 31, 2022
CSS Boilerplate / Starter Kit: Collection of best-practice CSS selectors

Natural Selection Natural Selection is a CSS framework without any styling at all. It is just a collection of selectors that can be used to define glo

FrontAid CMS 104 Dec 8, 2022