Get Started with Material Tailwind

Material Tailwind is free and open-source components library for Tailwind CSS inspired by Material Design.


Learn how to use @material-tailwind/html components from this documentation to quickly and easily create elegant and flexible pages using Tailwind CSS.

@material-tailwind/html is working with Tailwind CSS classes and you need to have Tailwind CSS installed on your project - Tailwind CSS Installation.

Using NPM

Install @material-tailwind/html as a dependency using NPM by running the following command:

npm i @material-tailwind/html

Using Yarn

Install @material-tailwind/html as a dependency using Yarn by running the following command:

yarn add @material-tailwind/html

Using PNPM

Install @material-tailwind/html as a dependency using PNPM by running the following command:

pnpm i @material-tailwind/html

TailwindCSS Configurations

Once you install @material-tailwind/html you need to wrap your tailwind css configurations with the withMT() function coming from @material-tailwind/html/utils.

const withMT = require("@material-tailwind/html/utils/withMT");
module.exports = withMT({
  content: ["./index.html"],
  theme: {
    extend: {},
  plugins: [],

Ripple Effect

@material-tailwind/html comes with a ripple effect script file same as Material Design ripple effect and you can simply use it by adding it's CDN link to you project and add the data-ripple-light="true" for light ripple effect and data-ripple-dark="true" for dark ripple effect as an attribute for components

The ripple effect used in @material-tailwind/html is a separate package called material-ripple-effect

<!-- from node_modules -->
<script src="node_modules/@material-tailwind/[email protected]/scripts/ripple.js"></script>
<!-- from cdn -->
<script src="[email protected]/scripts/ripple.js"></script>


Add a link for the material icons fonts inside the head of your project, so to use the material icons with material tailwind components. You can also use font awesome font family for the project just add a link for it inside the head of your project.

<!-- Material Icons Link -->
<!-- Font Awesome Link -->


You can use @material-tailwind/html as a CDN link as well, you just need to add the stylesheet and the script file for the component you want to use.

<!-- stylesheet -->
  href="[email protected]/styles/material-tailwind.css"
<!-- script -->
<script src="[email protected]/scripts/script-name.js"></script>


Now you're good to go and use @material-tailwind/html in your project.

<button class="button button-pink" data-ripple-light="true">
Edit this page on Github