npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@material-tailwind/html

v3.0.0-beta.7

Published

Material Tailwind is an open-source library that uses the power of Tailwind CSS and React to help you build unique web projects faster and easier. The stunning design inspired by Material Design is a bonus!

Readme

Material Tailwind - Free Tailwind CSS Components Library

Material Tailwind is a free and open-source collection of customizable, production-ready UI components built with Tailwind CSS. Designed to be developer-friendly and performance-focused, Material Tailwind streamlines the creation of modern, visually appealing interfaces, helping you deliver high-quality user experiences faster.

Material Tailwind Thumb

npm version npm downloads

Table of Contents

Getting Started

Learn how to use @material-tailwind/html components 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 with CDN

You can include @material-tailwind/html via a CDN and initialize alerts globally in the browser. Add the following script to your HTML file:

<script
  src="https://cdn.jsdelivr.net/gh/creativetimofficial/[email protected]/packages/dist/material-tailwind.min.js"
  defer
></script>

Basic Usage NPM

npm i @material-tailwind/[email protected]

After installing, you can use the components in your project across different frameworks:

import { initAlert } from "@material-tailwind/html";

// Initialize alerts
initAlert();

Using with Global Access

If you prefer, you can use the Material Tailwind global object instead of directly importing initAlert:

import * as MaterialTailwind from "@material-tailwind/html";

// Initialize alerts
MaterialTailwind.initAlert();

TypeScript

Material Tailwind components can be used in two ways - through simple ESM imports or programmatically with TypeScript support. Here's how to use both approaches:

Simple ESM Import

The quickest way to use components is through direct ESM imports:

import { initAlert } from "@material-tailwind/html";

// Initialize alerts
initAlert();

Programmatic Usage with TypeScript

For more control and type safety, you can use the programmatic approach with full TypeScript support:

This programmatic approach provides:

  • Full TypeScript support
  • Fine-grained control over component behavior
  • Access to component instance methods
  • Proper cleanup on unmount
import { Accordion } from "@material-tailwind/html";
import type { AccordionConfig, IAccordion } from "@material-tailwind/html";

document.addEventListener("DOMContentLoaded", () => {
  const container = document.getElementById("accordion-container");

  if (container) {
    const config: AccordionConfig = {
      exclusive: true,
      allOpen: false,
    };

    const accordion: IAccordion = new Accordion(container, config);

    // Handle external button controls
    const showAllButton = document.getElementById("show-all");
    const hideAllButton = document.getElementById("hide-all");
    const toggleFirstButton = document.getElementById("toggle-first");

    showAllButton?.addEventListener("click", () => {
      accordion.showAll();
    });

    hideAllButton?.addEventListener("click", () => {
      accordion.hideAll();
    });

    toggleFirstButton?.addEventListener("click", () => {
      const firstButton = document.getElementById("button-1") as HTMLElement;
      if (firstButton) {
        accordion.toggle(firstButton);
      }
    });

    // Cleanup on unmount
    window.addEventListener("unload", () => {
      accordion.cleanup();
    });
  }
});

For detailed usage of each component, check out their respective documentation:

Congratulations 🥳, you did it, now you're ready to use @material-tailwind/html.

Documentation

Material Tailwind’s documentation includes code snippets, previews, and detailed usage instructions for each component, ensuring a smooth implementation process.

Visit the Material Tailwind Docs to explore the entire library.

Explore Components

Community

  • We're excited to see the community adopt Material Tailwind, raise issues, and provide feedback.
  • Whether it's a feature request, bug report, or a project to showcase, please get involved!

License

Copyright (c) 2020-2025 Creative Tim

Material Tailwind is distributed under the MIT License, providing freedom and flexibility for all projects.

Contribute & Feedback

We welcome contributions and feedback! If you have suggestions, encounter issues, or want to propose new components, feel free to open an issue or submit a pull request on our repository. Your input helps make Material Tailwind better for everyone.


Build better, faster, and smarter with Material Tailwind. Explore the documentation and start leveraging our components to deliver polished, user-friendly interfaces with ease.