A design system that fully embraces web standards 🤗
Think of it as HTML6
So modern it feels old!
Because UI should be fun 🥳
It's freedom, baby. Yeah!
Code depressed? Call 1-800-MDASH
28 components, 220+ utility classes, and it's how small???
"Nothing is faster than nothing."
The AWS bill was $90 last month!!
You can stop reading this.
How many of these are there?
15, including this one.
Does it loop though?
This is the web. Let's use it.
What is Mdash?
Mdash is a new kind of UI library. It's 100% standards-based and it's tiny.
Mdash components are comprised of standard HTML, custom HTML, and Custom Elements. As such, Mdash works with any framework or no framework, and works with all types of web projects like SSR, SPA, PWA, static site, and even popular email clients.
What makes Mdash different?
Quite literally, nothing. Nothing is exactly what makes Mdash different:
- No new concepts or abstractions
- No setup or configuration
- Nothing proprietary
- No dependencies
- No build step
It's just HTML plus custom HTML. As a result, no other UI library is as small or easy or familiar as Mdash.
Where did Mdash come from?
Mdash is the result of building design systems in large engineering organizations where - for better or worse - tech stacks and architectures vary wildly, but the products still need to share common UI elements. It was during this time the TAC CSS methodology was created with Mdash being the first open-source implementation.
Compatible with everything
Mdash can be used anywhere HTML is used because it is HTML. Larger organizations especially benefit here because unlike other UI libraries, Mdash will work with all your products regardless of technology. To demonstrate, here's code samples of 13 different technologies all using the same Mdash component:
Mdash is fast! It is by all practical measures instant. The execution speed comes from leveraging standards and reducing abstractions as much as possible in order to minimize code and retain browser optimizations. When it comes to code, nothing is faster than nothing. In addition to execution speed, pages load faster because Mdash is so much smaller than other UI libraries:
|Material Web 2||
|Material Web 3||
Mdash is designed for production use with a CDN. Copy and paste the following into the
<head> section of your document and you're golden.
Icon font preload
<link href="https://email@example.com/dist/m-.woff2" rel="preload" as="font" crossorigin>
The preload option tells the browser to start downloading the icon font now instead of waiting for the stylesheet to be parsed. If you don't use icons, you don't need this.
<link href="https://firstname.lastname@example.org/dist/m-.css" rel="stylesheet">
<script src="https://email@example.com/dist/m-.js" defer></script>
The defer option tells the browser to download the script but delay its evaluation to avoid blocking document parsing.
If the CDN is not an option, you can install the Mdash package and bundle the files.
npm install m-
Built assets (those three files above) are located in
/dist. The hyper optimization of inlining is also possible with Mdash because its so small. Go for it you speed demon!
Mdash works with the latest versions of all major browsers. Please file a bug if you see something not working as expected.
More about Mdash
To return the UI layer back to its rightful owner: the web platform.
The application layer - data, routing, business logic, services - should also be built with the modern web stack as well as 3rd-party libraries and frameworks.
Depending on the kind of project you're working on, you can use Mdash on its own or alongside your framework of choice. In the latter case, the framework is responsible for the structure and state of your application while HTML and Mdash supply the final layer of UI.
Frameworks are misused
The UI layer of web applications has been overcomplicated and made dependent upon non-standard frameworks and methodologies that, in the context of generic UI components, do not add value. Frameworks are best applied to application-centric problems like routing, state management, and high-level product-centric component structure. Frameworks are not ideal for pure UI-centric problems like layout, shared UI elements, and generic styles.
The m- prefix
A prefix is required for any custom HTML (tags or elements). The "m" is for markup, because Mdash is all about that beautiful declarative markup! And no the name "Mdash" doesn't have anything to do with Lodash. It was suggested the proper name be changed from "M-" to "Mdash" to help with search engine results.
Mdash believes in and is committed to the web platform. Developing on the web is awesome because:
- It's open
- Has low barriers to entry
- Easier than other platforms
- Available on virtually every device in the world!
- Has the biggest and most active user base by far!
The intent of the Mdash API design is to be familiar. Where possible, Mdash matches native HTML, e.g.
disabled, and when there isn't a native example to follow Mdash strives to use familiar patterns, e.g.
dismissible="false" for Alert was chosen because it feels similar to the native
draggable="false" attribute. If you could cover up all the
m- prefixes in your markup, the hope is you couldn't tell the difference between native HTML elements and Mdash.
It's for everyone!
The web is an open platform accessible to everyone and so a design system for the web shouldn't require advanced knowledge just to get started, and it shouldn't require a commitment to learn a specific framework's idioms and API in order to make full use of it. Mdash serves true beginners equally as well as it does professional software engineers. So, whether you're building your first website or a large scale application with millions of users, Mdash helps you quickly build UI with significantly less code and with the longevity that only comes with standards-based code.