Skip to main content

mockitdown

UI mockups written in SwiftUI syntax inside Markdown, rendered at build time as HTML and CSS that look like a real UI framework, in light and dark: SwiftUI (iOS, iPadOS, macOS), Fluent (WinUI 3), Material UI, Angular Material, SAPUI5 (Fiori Horizon), Bootstrap, shadcn/ui, Ant Design, Tailwind Catalyst, IBM Carbon, GitHub Primer, Android (Material 3), GTK 4 / libadwaita, Qt 6, Avalonia UI and KDE Plasma — plus retro systems from Engelbart's 1968 NLS demo through the Xerox Star, Windows 1.0, NeXTSTEP, Windows 95 and Mac OS X Aqua to Windows Vista. Charts, spreadsheets, boards, numbered callouts, pointers and drag-select overlays are built in.

Demos · Documentation · Source

```mockitdown device="phone" appearance="both"
import SwiftUI

NavigationStack {
  List {
    Row("Wi-Fi", detail: "Home", systemImage: "wifi", chevron: true)
    Toggle("Airplane Mode", isOn: false)
  }
  .navigationTitle("Settings")
}
```
  • One notation, many frameworks. import SwiftUI, import FluentUI, import MUI, … selects a design pack; each pack adds the framework's own component names and styles.
  • Custom components. Declare struct MyRow: View { … } in a block or in a .mockitdown library and import "shared/rows" it anywhere in the site.
  • Self-contained output. No JavaScript, no CDN, no web fonts; local images are embedded.
  • MkDocs and Zensical. A Python-Markdown extension plus a superfences fence; no MkDocs plugin.

Install and configure

pip install "mockitdown[markdown]"
# or the latest from GitHub:
pip install "mockitdown[markdown] @ git+https://github.com/bbogovich/mockitdown@main"

Python 3.11 or later. The core has no dependencies; the markdown extra adds Python-Markdown and pymdown-extensions for the MkDocs / Zensical integration.

mkdocs.yml (read by both MkDocs and Zensical; any theme, Material recommended):

markdown_extensions:
  - mockitdown:
      default_pack: swiftui          # pack for blocks that name none
      default_appearance: auto       # light | dark | auto (follow the page) | both
      import_paths: [docs/mockups]   # where import "…" looks
      asset_paths: [docs]            # where Image("…") looks
      strict: true                   # fail the build on mockup errors
  - pymdownx.superfences:
      custom_fences:
        - name: mockitdown
          class: mockitdown
          format: !!python/name:mockitdown.fence.format
          validator: !!python/name:mockitdown.fence.validate

Command line

mockitdown render screen.mockitdown --standalone -o screen.html   # a full page with CSS
mockitdown check docs/mockups/*.mockitdown                         # diagnostics, exit 1 on errors
mockitdown css --pack fluent -o docs/assets/mockitdown.css         # for `css: none` sites
mockitdown packs                                                   # installed packs
mockitdown elements mui --markdown                                 # a pack's element catalogue

Repository

Path Holds
src/mockitdown/ the library: syntax/ (lexer, parser), evaluate.py, render/, packs/<id>/, styles.py, extension.py, fence.py, cli.py
examples/site/ the example site (Zensical): one page per pack; also the end-to-end test fixture
tests/ unit tests and the example-site test
tools/snapshot.py render a mockup and screenshot it with headless Chrome

The definition, specification and implementation documentation are on the docs branch (worktree ../mockitdown.docs), published to GitHub Pages.

python3.14 -m venv .venv && .venv/bin/pip install -e ".[markdown]" zensical
.venv/bin/python -m unittest discover -s tests -t .
cd examples/site && ../../.venv/bin/zensical serve

Licence: MIT.

Metadata

Release files for mockitdown 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mockitdown 0.2.0
File Size Uploaded Provenance Actions
mockitdown-0.2.0.tar.gz 616.8 kB With provenance Details for mockitdown-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mockitdown 0.2.0
File Interpreter ABI Platform Actions
mockitdown-0.2.0-py3-none-any.whl Python 3 none any Details for mockitdown-0.2.0-py3-none-any.whl

Total release size: 1.3 MB

Release files / mockitdown-0.2.0.tar.gz

Download URL mockitdown-0.2.0.tar.gz
Size 616.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c298c3817d02586e3a3db4f8c5f9834ed38c2306e24088ac192fcee741b37f55
BLAKE2b-256 checksum
How to use checksums
77f36e48aaef3b9b7846be3e2993c24af1785b5df083f9d348e8a62a214ebff1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / mockitdown-0.2.0-py3-none-any.whl

Download URL mockitdown-0.2.0-py3-none-any.whl
Size 641.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
163935e45b14876e63d948e666cb3ee5e0666df35bf25a7d1a2da499ac22d7c2
BLAKE2b-256 checksum
How to use checksums
a9eeee50fda79ac97fa1fa266a3d872c0a88e983cf8d8164ab7db8700f053d32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for mockitdown 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mockitdown-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page