PHPackages                             sideshot/markdown2-tailwindui-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. sideshot/markdown2-tailwindui-php

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

sideshot/markdown2-tailwindui-php
=================================

An opinionated Markdown parser that outputs beautiful Tailwind UI HTML, with custom tags and embed support.

1.0.2(8mo ago)15MITPHP

Since Jul 8Pushed 8mo agoCompare

[ Source](https://github.com/sideshot/markdown2-tailwindui-php)[ Packagist](https://packagist.org/packages/sideshot/markdown2-tailwindui-php)[ Docs](https://github.com/sideshot/markdown2-tailwindui-php)[ RSS](/packages/sideshot-markdown2-tailwindui-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

Markdown2TailwindUI PHP
=======================

[](#markdown2tailwindui-php)

**Markdown2TailwindUI PHP** is an opinionated Markdown parser that transforms plain Markdown into beautiful, responsive HTML layouts styled with Tailwind UI utility classes. It is designed for projects that want rich, styled content without custom CSS or manual HTML tweaks.

Features
--------

[](#features)

- **Tailwind-Ready Output:** All HTML is styled with Tailwind utility classes for instant, modern design.
- **Responsive Tables:** Markdown tables are converted to responsive, styled layouts.
- **Smart Typography:** Smart punctuation for better readability.
- **Embeds:** Native support for YouTube, Twitter, GitHub, and more.
- **Custom Tags:** Use `[MPN:12345]` to auto-link part numbers (customizable for your domain).
- **Table of Contents:** Automatic TOC generation for long documents.
- **Heading Level Shifting:** Optionally shift all headings to fit your page hierarchy.
- **Security:** Escapes user input in custom tags to prevent XSS.

Limitations
-----------

[](#limitations)

- This package is currently tailored for a specific project and may lack flexibility for all use cases.
- Only a few custom tags are supported out of the box.
- Configuration options are limited but will expand in future releases.

Roadmap
-------

[](#roadmap)

- More flexible custom tag/plugin system
- Additional configuration options
- Improved accessibility and ARIA support
- More embed providers

Installation
------------

[](#installation)

```
composer require sideshot/markdown2-tailwindui-php
```

Usage
-----

[](#usage)

```
use Sideshot\Markdown2TailwindUI;

$parser = new Markdown2TailwindUI(['base_header_level' => 3]);
$result = $parser->to_html($markdownString);
echo $result['toc'];   // Table of Contents HTML
echo $result['html'];  // Main HTML content
```

License
-------

[](#license)

MIT

Author
------

[](#author)

Richard ([@sideshot](https://github.com/sideshot))

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance62

Regular maintenance activity

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Total

3

Last Release

261d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e38bfb25cc467a2acf724323643b5b4a75cf742b7a7892e6a1f76e98fd80754f?d=identicon)[sideshot](/maintainers/sideshot)

---

Top Contributors

[![maincp](https://avatars.githubusercontent.com/u/162086000?v=4)](https://github.com/maincp "maincp (2 commits)")[![sideshot](https://avatars.githubusercontent.com/u/2152810?v=4)](https://github.com/sideshot "sideshot (1 commits)")

---

Tags

parserhtmlmarkdowncommonmarktailwindembedtailwindcsstailwinduiopinionatedcustom tags

### Embed Badge

![Health badge](/badges/sideshot-markdown2-tailwindui-php/health.svg)

```
[![Health](https://phpackages.com/badges/sideshot-markdown2-tailwindui-php/health.svg)](https://phpackages.com/packages/sideshot-markdown2-tailwindui-php)
```

###  Alternatives

[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

2.9k404.0M696](/packages/league-commonmark)[paquettg/php-html-parser

An HTML DOM parser. It allows you to manipulate HTML. Find tags on an HTML page with selectors just like jQuery.

2.4k7.9M121](/packages/paquettg-php-html-parser)[s9e/text-formatter

Multi-purpose text formatting and markup library. Plugins offer support for BBCodes, Markdown, emoticons, HTML, embedding third-party media (YouTube, etc...), enhanced typography and more.

2413.1M29](/packages/s9e-text-formatter)[torchlight/torchlight-commonmark

A Commonmark extension for Torchlight, the syntax highlighting API.

29256.6k6](/packages/torchlight-torchlight-commonmark)[jbroadway/slimdown

A simple regex-based Markdown parser.

357.7k](/packages/jbroadway-slimdown)[ows/commonmark-sup-sub-extensions

A sup/sub extension for CommonMark PHP implementation

107.7k](/packages/ows-commonmark-sup-sub-extensions)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
